You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm also looking to do a technique like this for another node library I contribute to.
I think this is set up to work best with the next major version of TypeScript coming out at the beginning of next month, as they're making changes to support parsing JS+JSDoc via TypeScript-compiler.
If JSDoc is super detailed and robust, then theoretically, the .d.ts declaration file could be directly output from there. -- From my initial work writing the JSDoc types for another library, however, it was way clunkier and harder to do than directly writing TypeScript, and nothing helped guide correctness in the JSDoc types. :(
It is possible to use JSDoc comments with the TypeScript compiler to enforce some strong typing, as documented in the following resources:
Here is the best example I have found: prettier/prettier#6313
I would personally favor this alternative over porting to TypeScript as proposed in #64.
The text was updated successfully, but these errors were encountered: