I want to update the annotations with Promises to take a type parameter (like you're doing with Array).
@returns {Promise|TerrainMesh}
Would be:
@returns {Promise.<TerrainMesh>}
Would this be accepted?
EDIT: I need this for the TS definition files I'm writing
EDIT 2: is this a better question for the mailing list?
As long as the documentation still builds, I don't see a problem with this change
TS definition file looks cool, are you generating that from the jsDoc or writing it by hand? I unfortunately haven't had a lot of time to explore typescript, but I'm sure something like that would definitely be useful for many people.
@mramato I wrote a (very ugly) node.js script that generates it from the JSON output of jsdoc -X. Once I'm able to generate it without the compiler yelling at me (almost there) I want to run it against your tests. After that I'll add it to https://github.com/borisyankov/DefinitelyTyped
@icholy this seems cool. Do you think this could / should eventually be added to Cesium's build/combine script, so that TypeScript definitions always keep up with new features? I haven't played with TypeScript yet, I keep meaning to find time to look into it.
@emackey I wouldn't be against it (once it's fully automated). It could even be used as a way to enforce correct type annotations in the comments (to some extent at least).
@icholy Ah, I see someone else is also trying to make a (sorely needed) TypeScript definition for Cesium
I'm currently developing a JSDoc plugin to generate TypeScript definition files from parsed JSDoc doclets.
https://github.com/jumpinjackie/jsdoc-typescript-plugin
Initial focus is currently to automatically generate working TSD files for OpenLayers, but Cesium is also in my crosshairs.
Perhaps we could pool our efforts and knowledge together?
@icholy and @jumpinjackie I'm sure we'd be happy to ship an official TS definition file with Cesium if there's an easy way to automatically generate and validate it as part of our build process, so I'm all for this effort.
@mramato @jumpinjackie #2879 is my blocker
@mramato Do you have any new updates on Typescript definition file for Cesium?
Andr茅 Staltz - All JS libraries should be authored in TypeScript
@emackey @mramato Check this Cesium Typescript generator made in C# 6.0... maybe you guys can use this as a base? Probably better to go with the JsDoc route though.
Also looking to use Cesium with our Typescript project. Having defined types for Cesium would be very useful.
Generating type definitions from jsDoc would also make documentation bugs more obvious (there are a handful).
Most helpful comment
Also looking to use Cesium with our Typescript project. Having defined types for Cesium would be very useful.