I've been working on a Cesium-based project for a few months now, and picked Visual Studio Code as my primary editor. I was a little irritated that other libraries I rely on (like Moment and jQuery) have good feedback from Intellisense, while Cesium doesn't give me anything (out of the box, at least). I learned that this is because the more popular libraries have a "Typings" file (.d.ts) either available from an external source, or bundled into the Node module directly.
I found this repo and placed the index.d.ts in my node_modules/cesium/ and like magic, VSCode knew the types of all the Cesium classes and functions -- except that listing was last updated 4 months ago with version 1.26, so it was missing stuff that's changed in the last half-dozen or so releases. I've added some things to it myself, though I wouldn't say it's definitely complete. I can post my modified version if anybody would like that.
I recognize that this would be an ongoing requirement, either to maintain manually or to generate as part of your build workflow, but I think it would really help out both those that try to use Cesium from actual Typescript, and those that work with vanilla-JS Cesium from VSCode.
I've been working on a Cesium-based project for a few months now, and picked Visual Studio Code as my primary editor. I was a little irritated that other libraries I rely on (like Moment and jQuery) have good feedback from Intellisense, while Cesium doesn't give me anything (out of the box, at least). I learned that this is because the more popular libraries have a "Typings" file (
.d.ts) either available from an external source, or bundled into the Node module directly.I found this repo and placed the
index.d.tsin mynode_modules/cesium/and like magic, VSCode knew the types of all the Cesium classes and functions -- except that listing was last updated 4 months ago with version 1.26, so it was missing stuff that's changed in the last half-dozen or so releases. I've added some things to it myself, though I wouldn't say it's definitely complete. I can post my modified version if anybody would like that.I recognize that this would be an ongoing requirement, either to maintain manually or to generate as part of your build workflow, but I think it would really help out both those that try to use Cesium from actual Typescript, and those that work with vanilla-JS Cesium from VSCode.