remarkjs / remark-react

Deprecated plugin to transform to React — please use `remark-rehype` and `rehype-react` instead
524 stars 37 forks source link

Add Typescript types #69

Closed alexkreidler closed 3 years ago

alexkreidler commented 3 years ago

A type definition file would be very helpful for those of us who us TS. Let me know if you're open to a PR for this.

Thanks for the project!

wooorm commented 3 years ago

We do accept type definitions! See this list of PRs that have added types before!

ChristianMurphy commented 3 years ago

To add on, remark-react builds on and surfaces options from: https://github.com/syntax-tree/mdast-util-to-hast, https://github.com/syntax-tree/hast-util-sanitize, and https://github.com/syntax-tree/hast-to-hyperscript each of which have typings that can be imported/leveraged here.

wooorm commented 3 years ago

I’m going to close this issue because PRs that add types are accepted in all unified projects, and I don’t see much value in keeping issues open for a few, or all, of the projects without types.

Furthermore, I want to archive and deprecate this project, as the suggested route as noted in the readme is to use the parts in this project instead (which have types), but it’s confusing that both ways are possible.