Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Node } from 'unist';

declare type TestObj = { [key: string]: unknown };
declare type TestFn<V extends Node> = (node: V) => boolean;

declare function find<V extends Node>(tree: Node, test: string | TestObj | TestFn<V>): V;

export default find;

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"author": "Richard Smith-Unna <rik@fathomlabs.io> @blahah",
"license": "MIT",
"devDependencies": {
"@types/unist": "^2.0.3",
"remark": "^7.0.0",
"standard": "^8.0.0",
"tape": "^4.6.0"
Expand Down