File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
2
* @typedef {import('unist').Position } Position
3
+ * @typedef {import('unist').Node } Node
4
+ * @typedef {Record<string, unknown> & {type: string, position?: PositionLike|undefined} } NodeLike
3
5
* @typedef {import('unist').Point } Point
4
6
*
5
7
* @typedef {Partial<Point> } PointLike
6
8
*
7
- * @typedef { Object } PositionLike
9
+ * @typedef PositionLike
8
10
* @property {PointLike } [start]
9
11
* @property {PointLike } [end]
10
- *
11
- * @typedef {Object } NodeLike
12
- * @property {PositionLike } [position]
13
12
*/
14
13
15
14
export const pointStart = point ( 'start' )
Original file line number Diff line number Diff line change @@ -2,17 +2,18 @@ import test from 'tape'
2
2
import { position , pointStart , pointEnd } from './index.js'
3
3
4
4
const properties = {
5
+ type : 'a' ,
5
6
position : {
6
7
start : { line : 1 , column : 1 , offset : 0 } ,
7
8
end : { line : 1 , column : 2 , offset : 1 }
8
9
}
9
10
}
10
11
11
- const noFields = { position : { start : { } , end : { } } }
12
+ const noFields = { type : 'b' , position : { start : { } , end : { } } }
12
13
13
- const noPoints = { position : { } }
14
+ const noPoints = { type : 'c' , position : { } }
14
15
15
- const noPosition = { }
16
+ const noPosition = { type : 'd' }
16
17
17
18
const generated = { line : null , column : null , offset : null }
18
19
You can’t perform that action at this time.
0 commit comments