-
Notifications
You must be signed in to change notification settings - Fork 15
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
Improve parser to support more typescript syntax #64
Comments
Yes, that would be terrific! It would be ideal if Catharsis supported all TypeScript types. I'd prefer to make users specify whether they're passing in a TypeScript type expression; a Closure Compiler type expression; or a JSDoc type expression, which is basically Closure Compiler + a few extras. (I don't want to fool anyone into thinking that Closure Compiler supports TypeScript syntax, or vice-versa.) So it might make sense to write a separate PEG grammar for TypeScript type expressions, rather than trying to shoehorn TypeScript support into the existing grammar. Similarly, it might make sense to write a separate stringifier for TypeScript types. In contrast, the parse tree should use the same format as for Closure Compiler types. If you think any of that doesn't make sense, let me know. If that all sounds good, I'd welcome a PR! |
I would be interested to add support for typescript syntax, but I don't think I would want to write a whole new part of the software. The main thing why I want to do this, is that I do a little work for an open source project (https://github.com/openlayers/openlayers) that uses jsdoc for the documentation but uses more complex types that are checked by typescript. For us it would be great if there was a route where we could gradually add changes to feel the benefits in a reasonable amount of time. |
Hi! I wanted to ask if you are open to accept PRs that would enable JSDoc to parse more typescript specific types. For example the intersection types (See #62). I think this would be good because more and more projects are using JSDoc together with the typescript parser.
The text was updated successfully, but these errors were encountered: