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.
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.
To add Intellisense support for Wijmo for Angular interop to VSCode HTML editor, perform the following steps:
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" />
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.
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: