Skip to content

Commit

Permalink
Fix types to support any unist node
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Mar 2, 2022
1 parent a10182a commit b9b6cc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var own = {}.hasOwnProperty

/**
* @typedef {import('unist').Node} Node
* @typedef {Record<string, unknown> & {type: string, position?: Position|undefined}} NodeLike
* @typedef {import('unist').Position} Position
* @typedef {import('unist').Point} Point
*/
Expand All @@ -10,7 +10,7 @@ var own = {}.hasOwnProperty
* Stringify one point, a position (start and end points), or a node’s
* positional information.
*
* @param {Node|Position|Point} [value]
* @param {NodeLike|Position|Point} [value]
* @returns {string}
*/
export function stringifyPosition(value) {
Expand Down

0 comments on commit b9b6cc5

Please sign in to comment.