Skip to content

Commit b9b6cc5

Browse files
committed
Fix types to support any unist node
1 parent a10182a commit b9b6cc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var own = {}.hasOwnProperty
22

33
/**
4-
* @typedef {import('unist').Node} Node
4+
* @typedef {Record<string, unknown> & {type: string, position?: Position|undefined}} NodeLike
55
* @typedef {import('unist').Position} Position
66
* @typedef {import('unist').Point} Point
77
*/
@@ -10,7 +10,7 @@ var own = {}.hasOwnProperty
1010
* Stringify one point, a position (start and end points), or a node’s
1111
* positional information.
1212
*
13-
* @param {Node|Position|Point} [value]
13+
* @param {NodeLike|Position|Point} [value]
1414
* @returns {string}
1515
*/
1616
export function stringifyPosition(value) {

0 commit comments

Comments
 (0)