Skip to content
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

Conversation

ChristianMurphy
Copy link
Member

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

@ChristianMurphy ChristianMurphy requested a review from wooorm August 29, 2018 04:36
Copy link
Member

@wooorm wooorm left a 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?

@ChristianMurphy
Copy link
Member Author

ChristianMurphy commented Aug 29, 2018

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.

@wooorm wooorm added 🧒 semver/minor This is backwards-compatible change minor labels Aug 31, 2018
@wooorm
Copy link
Member

wooorm commented Aug 31, 2018

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 unist-ts. Can we continue discussing how to do this over there in syntax-tree/unist-ts#1?

@wooorm wooorm closed this Aug 31, 2018
@ChristianMurphy ChristianMurphy deleted the feature/add-typescript-definitions branch August 31, 2018 14:56
@ChristianMurphy
Copy link
Member Author

Sounds good

@ChristianMurphy
Copy link
Member Author

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

@wooorm wooorm added ☂️ area/types This affects typings 🙅 no/wontfix This is not (enough of) an issue for this project and removed 🧒 semver/minor This is backwards-compatible change labels Aug 12, 2019
@wooorm wooorm changed the title feature: add typescript definitions Add typescript definitions Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☂️ area/types This affects typings 🙅 no/wontfix This is not (enough of) an issue for this project
Development

Successfully merging this pull request may close these issues.

2 participants