0

I'm new to VS Code and am trying to get IntelliSense code completion working for both dojo and arcgis api for javascript. I've installed both type definitions globally using typings. I get parameter hints on methods only after they've been completely typed out but no suggestions while typing. (I should clarify that I do get suggestions but just not for the methods/parameters I'm looking for.) I've tried both jsconfig and tsconfig (with allowJs set to true) with the same result.

Example for dojo string substitute() method:

No suggestions :

No suggestion

Parameter hints :

Parameter hints

As you can see from the images , it appears to be referencing the type definitions but for some reason its not providing the suggestions for autocomplete. I'm obviously missing something or just don't understand how its supposed to work.

Any help would be greatly appreciated. Thanks

Bourbia Brahim
  • 14,459
  • 4
  • 39
  • 52

1 Answers1

0

Autocomplete currently can't be accomplished with JavaScript because of the way dojo asynchronously loads modules. However, it can be accomplished with TypeScript by tricking ts that your dojo classes are ts classes. https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/dojo