diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..d45d8b1 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,9 @@ +import { Node } from 'unist'; + +declare type TestObj = { [key: string]: unknown }; +declare type TestFn = (node: V) => boolean; + +declare function find(tree: Node, test: string | TestObj | TestFn): V; + +export default find; + diff --git a/package.json b/package.json index 816fccb..68d6a64 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "author": "Richard Smith-Unna @blahah", "license": "MIT", "devDependencies": { + "@types/unist": "^2.0.3", "remark": "^7.0.0", "standard": "^8.0.0", "tape": "^4.6.0"