I am new to javascript. In windows Visual Studio Code, I want to get arcgis api Intellisense , some guidebook says first install node.js and typings, then install arcgis api.
The typings tool may be used to install this using the command:
typings install --global github:Esri/jsapi-resources/4.x/typescript/arcgis-js-api.d.ts
execute above line in cmd.exe , error shows the location is bad.
SO how can I install arcgis-js-api.d.ts
Thanks!
Wenhua,
It look like you can ignore that warning:
Warning about mutable location of dependency · Issue #624 · typings/typings · GitHub
Robert,
If i ignore the warning , i can't get arcgis api Intellisense in visual studio code. Is there any other IDE that can hint intelligently ArcGis API( function/attribute)? I think the intelligently hint is quite helpful.
Thank you so much!
In Rene Rubalcava's first vedeo , we can see he is using VisualStudioCode, and successfully get Intellisense
You need to have a tsconfig.json in the root of your folder with your TS settings and files.
You can see a sample project here.
GitHub - odoe/esrijs4-ts: Sample EsriJS 4 TypeScript Application
Rene,
Can you do a setting up type script in VS for dummies (i.e. people that have no experience with any of the components involved except VS)?
I copy tsconfig.json and typings.json from your sample, it still not work.
The use of the "typings" tool was deprecated in TypeScript 2.0. The type definitions for version 3.x of the ArcGIS API can be downloaded via NPM here, but I'm not sure what to do for version 4.x.
According your suggestion , I have installed the type definitions for version 3.x of the ArcGIS API . In Visual Studio 2015 ,intellsense now can provide a some hint. I don't know if it could be better. In Visual Studio Code, it still not work.