If hast is deprecated, why types are there? #105
-
Example: https://github.com/rehypejs/rehype-remark/blob/main/lib/index.js#L3 The |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is a distinction between The implementation, formerly hosted at https://www.npmjs.com/package/hast is deprecated, only https://www.npmjs.com/package/rehype should be used. |
Beta Was this translation helpful? Give feedback.
There is a distinction between
hast
the implementation, which now is known as rehype https://github.com/rehypejs/rehypeAnd hast the standard for AST nodes https://github.com/syntax-tree/hast
The implementation, formerly hosted at https://www.npmjs.com/package/hast is deprecated, only https://www.npmjs.com/package/rehype should be used.
https://www.npmjs.com/package/@types/hast is a types only package, which represents the standard https://github.com/syntax-tree/hast in TypeScript notation, and is leveraged by all
hast-util-*
andrehype-*
packages as part of their typings.