syntax-tree/hastscript

Add type definitions

TaylorBeeston opened this issue · 0 comments

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 (such as hast-util-sanitize).

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.