-
-
Notifications
You must be signed in to change notification settings - Fork 21
Add types #5
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 types #5
Conversation
An example of a typical extension is https://github.com/syntax-tree/mdast-util-gfm-table/blob/main/from-markdown.js. So, also enter/exit as keys, which then are objects mapping token types to functions |
9cdc15f
to
8ec23a3
Compare
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.
one nit but otherwise good, @ChristianMurphy?
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.
Thanks @ocavue!
Could we add a type tests for this to verify usage?
similar to https://github.com/micromark/micromark/blob/main/micromark.test.ts
micromark 2.10 has types! (edit: you’re fast) |
😂. I was just doing some experiments between |
Nice! ;) And, can you apply that |
389bc77
to
676f79a
Compare
Just added |
Does it make sense to put all these files in a types/ directory? That's what we've been doing to most other stuff in unified |
Just moved them. |
Co-authored-by: Christian Murphy <christian.murphy.42@gmail.com>
Co-authored-by: Christian Murphy <christian.murphy.42@gmail.com>
Released, thanks @ocavue! |
You're welcome. It's an honor to be able to contribute to such an awesome project. @wooorm |
@ocavue are you also interested in doing to-markdown? |
I can do that. I should be able to submit a PR sometime this week. @wooorm |
@ocavue alight! I tried it myself (I didn't want to rush you but also want to publish remark soon): syntax-tree/mdast-util-to-markdown#7 |
Some questions or TODOs:
Token
and mdast-util-from-markdown'sToken
?Buffer
frommicromark
? Or do we need to re-define our own interface for Node's Buffer?