[]
        
(Showing Draft Content)

JavaScript IntelliSense

IntelliSense is one of the best features in VSCode and Visual Studio. It saves typing effort, reduces errors, and helps you learn or remember object models as you work.

Using NPM modules

If Wijmo modules are loaded through NPM, VSCode and Visual Studio automatically use the declaration files from node_modules folder. Hence, no additional steps are required in this case.

Enabling HTML Intellisense for Wijmo for Angular components

To add Intellisense support for Wijmo for Angular interop to VSCode HTML editor, perform the following steps:

  • In a running VSCode instance, click the "Extensions" icon on the left side menu.
  • In the opened "Extensions" pane click the "More" (triple dot) icon, and select the "Install from VSIX..." menu item.
  • In the appeared Open File dialog choose the wijmo.intellisense.vscode.angular.html.vsix file from the Dist/Intellisense folder of the Wijmo download zip, and click the Open button.
  • In the appeared flyout push the "Reload Now" button.

Using Global modules / Loaded by Script tag

Enabling Wijmo IntelliSense in VSCode

To install the Wijmo IntelliSense definitions in VS Code, you will need the TypeScript definition files ("*.d.ts"). You can find these files in the Wijmo distribution under the "Controls" folder:

wijmo_5.xxxxx.xxx.zip
  Dist
    controls
wijmo.d.ts
wijmo.input.d.ts
wijmo.grid.d.ts
    … 
  IntelliSense
	Samples
	VSTemplates

Copy the ".d.ts" files to a folder under your VSCode project root. If the project has a "jsconfig.json" configuration file, make sure the ".d.ts" files are included. For example:

"files": [
  "typings/wijmo.d.ts",
  "typings/wijmo.input.d.ts",
  "typings/wijmo.grid.d.ts",
     …
]

Alternatively, you can specify the "*.d.ts" files by adding reference comments at the top of your "js" files. For example:

/// <reference path="typings/wijmo.d.ts" />

Enabling Wijmo IntelliSense in Visual Studio 2017

In Visual Studio 2017, JavaScript intellisense can be enabled using TypeScript declaration(*.d.ts) files. You can find Wijmo declaration files in the Wijmo download zip under "Dist/Controls" folder. Enabling the Wijmo JavaScript intellisense in Visual Studio 2017 depends on the method you choose to reference Wijmo in your application.

Using Wijmo IntelliSense

Once the Wijmo IntelliSense definition file has been installed, you will be able to search and explore the object model of any Wijmo class as you write JavaScript code. The image below shows an example: