-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiment: Create .d.ts
files from JSDOc
#173
Comments
Any update on this? |
@HarelM Hi, Harel. We had a decent attempt at doing this in the other Sinon projects, and as you can read from sinonjs/fake-timers#386 we decided to scrap the efforts. The test of using JSDoc to generate the typings did not live up to expectations, as JSDoc is not powerful enough to express the rich types that TypeScript allows for. At the same time, none of the current maintainers are interested in spending time supporting TypeScript (or PureScript or CoffeScript or any other transpiled language, for that matter), using our time on the core javascript matters. I see the downside of keeping the typings in another repo, but there is no other way in the foreseeable future. |
Thanks for the info! These PRs are intended to solve these issues: |
In order to better support the TypeScript community and have excellent API documentation, we would like to have great JSDoc comments for this library.
From the JSDoc comments we can extract
.d.ts
files, which will improve the experience of TypeScript users.See sinonjs/fake-timers#345
However, we are using a construction that is yet unsupported by TypeScript: microsoft/TypeScript#33207
Basically,
tsc
doesn't understand this construction and doesn't support JSDoc's@interface
annotationA solution could be spread across several pull requests:
nise
package (https://github.com/sinonjs/nise). DefinitelyTyped/DefinitelyTyped#30407 into this project as JSDoc commentsJSDoc
and also understood bytsc
tsc
to generate.d.ts
filesThe text was updated successfully, but these errors were encountered: