Files
astronomy/demo/nodejs/riseset.js
Don Cross 200080ca79 JavaScript: Defined string-valued enumerated type "Body".
Instead of declaring all the "body" parameters in the
TypeScript/JavaScript code to be strings, I created a
string-valued enumerated type called Body.

The same string values can still be passed in from JavaScript
code, or callers can use syntax like Astronomy.Body.Moon.

This improves the type checking inside the TypeScript source,
plus it adds better documentation for each of the parameters.
In the generated Markdown documentation, the user can click
on the Body type and see all the supported bodies.

The other three supported languages (C, C#, Python)
already use enumerated types for bodies, so this
brings the JavaScript version more in sync with them.
2021-03-27 10:44:50 -04:00

2.0 KiB