File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
- import * as vscode from " vscode" ;
2
- import parse from " json-to-ast" ;
1
+ import * as vscode from ' vscode' ;
2
+ import parse from ' json-to-ast' ;
3
3
4
4
export const getASTNode = (
5
5
children : parse . PropertyNode [ ] ,
6
6
type : string ,
7
7
keyValue : string
8
8
) => {
9
9
return children . find (
10
- ( child ) => child . key . type === type && child . key . value === keyValue
10
+ child => child . key . type === type && child . key . value === keyValue
11
11
) ;
12
12
} ;
13
13
14
14
export const getRangeFromASTNode = (
15
- node : parse . PropertyNode | parse . LiteralNode | parse . ObjectNode | parse . ValueNode
15
+ node :
16
+ | parse . PropertyNode
17
+ | parse . LiteralNode
18
+ | parse . ObjectNode
19
+ | parse . ValueNode
16
20
) => {
17
21
const startLine = node ?. loc ?. start . line || 0 ;
18
22
const endLine = node ?. loc ?. end . line || 0 ;
You can’t perform that action at this time.
0 commit comments