Skip to content

Commit 2bcc139

Browse files
committed
Fix to allow instances of Node again
1 parent 70206d1 commit 2bcc139

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const pointEnd = point('end')
1717
/**
1818
* Get the positional info of `node`.
1919
*
20-
* @param {NodeLike} [node]
20+
* @param {NodeLike|Node} [node]
2121
* @returns {Position}
2222
*/
2323
export function position(node) {
@@ -35,12 +35,10 @@ function point(type) {
3535
/**
3636
* Get the positional info of `node`.
3737
*
38-
* @param {NodeLike} [node]
38+
* @param {NodeLike|Node} [node]
3939
* @returns {Point}
4040
*/
4141
function point(node) {
42-
/** @type {Point} */
43-
// @ts-expect-error looks like a point
4442
const point = (node && node.position && node.position[type]) || {}
4543

4644
return {

0 commit comments

Comments
 (0)