File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -137,9 +137,14 @@ declare module 'web-tree-sitter' {
137137 query ( source : string ) : Query ;
138138 }
139139
140- interface QueryResult {
140+ interface QueryCapture {
141+ name : string ;
142+ node : SyntaxNode ;
143+ }
144+
145+ interface QueryMatch {
141146 pattern : number ;
142- captures : { name : string ; node : SyntaxNode } [ ] ;
147+ captures : QueryCapture [ ] ;
143148 }
144149
145150 interface PredicateResult {
@@ -151,8 +156,8 @@ declare module 'web-tree-sitter' {
151156 captureNames : string [ ] ;
152157
153158 delete ( ) : void ;
154- matches ( node : SyntaxNode , startPosition ?: Point , endPosition ?: Point ) : QueryResult [ ] ;
155- captures ( node : SyntaxNode , startPosition ?: Point , endPosition ?: Point ) : QueryResult [ ] ;
159+ matches ( node : SyntaxNode , startPosition ?: Point , endPosition ?: Point ) : QueryMatch [ ] ;
160+ captures ( node : SyntaxNode , startPosition ?: Point , endPosition ?: Point ) : QueryCapture [ ] ;
156161 predicatesForPattern ( patternIndex : number ) : PredicateResult [ ] ;
157162 }
158163 }
You can’t perform that action at this time.
0 commit comments