11import type { Position , TextDocument } from "@cursorless/common" ;
22import { showError , type TreeSitter } from "@cursorless/common" ;
3- import type Parser from "web-tree-sitter" ;
3+ import type * as treeSitter from "web-tree-sitter" ;
44import { ide } from "../../singletons/ide.singleton" ;
55import { getNodeRange } from "../../util/nodeSelectors" ;
66import type {
@@ -31,7 +31,7 @@ export class TreeSitterQuery {
3131 /**
3232 * The raw tree-sitter query as parsed by tree-sitter from the query file
3333 */
34- private query : Parser . Query ,
34+ private query : treeSitter . Query ,
3535
3636 /**
3737 * The predicates for each pattern in the query. Each element of the outer
@@ -44,7 +44,7 @@ export class TreeSitterQuery {
4444 static create (
4545 languageId : string ,
4646 treeSitter : TreeSitter ,
47- query : Parser . Query ,
47+ query : treeSitter . Query ,
4848 ) {
4949 const { errors, predicates } = parsePredicates ( query . predicates ) ;
5050
@@ -132,7 +132,7 @@ export class TreeSitterQuery {
132132
133133function createMutableQueryMatch (
134134 document : TextDocument ,
135- match : Parser . QueryMatch ,
135+ match : treeSitter . QueryMatch ,
136136) : MutableQueryMatch {
137137 return {
138138 patternIdx : match . pattern ,
0 commit comments