-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add typescript definitions #19
Add typescript definitions #19
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! One Q and one suggestion.
I’m also wondering how to approach adding this to the ecosystem. I’d rather not write everything in typescript. I think loose definitions are okay though. What do you propose?
Yep, We're on the same page, my primary goal with this is to offer inline hints and documentation in editors that are typescript aware. I'd stick with loose type definitions. |
Hey this is super awesome! I refactored it a bit, but I felt a bit weird actually adding them to the repo here. I think it makes more sense to do it in their own repo, so I made |
Sounds good |
Some additional discussion on how to manage TS Definitions is going on at https://spectrum.chat/unified/vfile/fix-vfile-type-definitions~5f1a8b89-b6d3-49a7-8158-0dd03595f2dc |
This can be used to provide base types, that downstream standard, like mdast, hast, and nlcst can use, as well as downstream libraries like unified, remark, rehype, and retext.
https://www.typescriptlang.org/docs/handbook/interfaces.html
https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html