PR proposal: Add JSDoc types
barakplasma opened this issue · 2 comments
barakplasma commented
Would you accept a PR which added JSDoc types?
For example:
/**
* @typedef {number | [number, number]} locationCoordinate
*/
/**
* @param {locationCoordinate} lat
* @param {locationCoordinate} lon
*/
HebcalProto.setLocation = function(lat, lon) {
this.months.forEach(function(m){
m.setLocation(lat, lon);
});
return this;
};
This could assist users of VS Code with Intellisense via JSDoc. Additionally, lets us run a bit of Typescript checking on the library. See also https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc
Scimonster commented
That would be awesome!
Arrow7000 commented
@barakplasma I'd be really grateful if you did this!