SN Widget Kit logoSN Widget Kit
Docs

Authoring

IntelliSense

Autocomplete for the full ServiceNow API — and for the Script Includes from your own instance, synced automatically.

IntelliSense is installed automatically when you open a workspace with widgets. It generates files under .sn-widget-kit-types/ and configures jsconfig.json.

What you get

  • Static API (glide.d.ts, service-portal.d.ts, widget-globals.d.ts): gs, GlideRecord, GlideAggregate, GlideDateTime, GlideAjax, GlideUser, $sp, spUtil, spModal, i18n, $scope, c, data, options, input
  • From your instance (instance-script-includes.d.ts): all active Script Includes become declare class per scope → new global.YourScript() autocompletes with the real methods

Automatic Script Include sync

Sync runs on login, re-checks when you focus the VS Code window (throttled) or periodically (fallback, configurable via instanceTypesSyncIntervalMinutes). Cheap watermark-based detection — it only re-syncs when something changes on the instance.

A Script Include didn't show up?
Run SN Widget: Diagnose Script Include — it checks whether the include is active, its scope, ACLs, whether it parses, and whether it's present in the generated .d.ts. You can also force a full rebuild with Sync Instance Types (Script Includes) or Reinstall IntelliSense Types.