syntax-tree / hast-util-sanitize

utility to sanitize hast nodes
https://unifiedjs.com
MIT License
48 stars 20 forks source link

Add type definitions #20

Closed TaylorBeeston closed 3 years ago

TaylorBeeston commented 4 years ago

Subject of the feature

Add TypeScript type definitions

Problem

It is currently difficult to use this package in a TypeScript project due to a lack of type definitions. This in turn also makes it different to add type definitions to a package that depends on this package.

Expected behaviour

When importing this module into a TypeScript project, the type should automatically be declared.

Alternatives

An alternative to simply adding a .d.ts file would be to actually convert the whole package to TypeScript, however, it is much easier to simply add a .d.ts file.

ChristianMurphy commented 4 years ago

Pull request(s) are welcome!

wooorm commented 3 years ago

Released!