IntelliSense is one of the best features in Visual Studio and VSCode. It saves typing effort, reduces errors, and helps you learn or remember object models as you work.
IntelliSense works great with TypeScript, but it is somewhat limited with JavaScript. You do get basic support for the language features, but external libraries are not supported unless you specify the custom definition files.
Starting with our 2016/V2 release, we are providing IntelliSense definition files for the entire Wijmo library. Simply install these files and you get full IntellliSense support when writing JavaScript code with Wijmo.
To install the Wijmo IntelliSense definition file in Visual Studio, you will need the "wijmo.intellisense.js" file. You can find this file in the Wijmo distribution under the "IntelliSense" folder:
C1Wijmo-Enterprise_5.xxxxx.xxx.zip
Dist
IntelliSense
readme.txt
wijmo.intellisense.js
Samples
VSTemplates
Perform the following steps to install the Wijmo IntelliSense definition file in Visual Studio:
Tools|Options|Text Editor|JavaScript|IntelliSense|References
Implicit (Web)
The image below shows the dialog:
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:
C1Wijmo-Enterprise_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" />
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: