Skip to content

Commit 4d17071

Browse files
authored
Add type annotations to tree-sitter imports (#1327)
- Split off of #1281 ## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet
1 parent c15b818 commit 4d17071

25 files changed

+25
-25
lines changed

packages/cursorless-engine/core/Debug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Disposable, TextEditorSelectionChangeEvent } from "@cursorless/common";
2-
import { SyntaxNode, TreeCursor } from "web-tree-sitter";
2+
import type { SyntaxNode, TreeCursor } from "web-tree-sitter";
33
import { ide } from "../singletons/ide.singleton";
44
import { Graph } from "../typings/Graph";
55

packages/cursorless-engine/languages/clojure.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from "../util/nodeMatchers";
88
import { NodeMatcherAlternative, NodeFinder } from "../typings/Types";
99
import { SimpleScopeTypeType } from "@cursorless/common";
10-
import { SyntaxNode } from "web-tree-sitter";
10+
import type { SyntaxNode } from "web-tree-sitter";
1111
import { delimitedSelector } from "../util/nodeSelectors";
1212
import { identity } from "lodash";
1313
import { getChildNodesForFieldName } from "../util/treeSitterUtils";

packages/cursorless-engine/languages/csharp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SyntaxNode } from "web-tree-sitter";
1+
import type { SyntaxNode } from "web-tree-sitter";
22
import {
33
cascadingMatcher,
44
chainedMatcher,

packages/cursorless-engine/languages/elseIfExtractor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Selection, TextEditor } from "@cursorless/common";
2-
import { SyntaxNode } from "web-tree-sitter";
2+
import type { SyntaxNode } from "web-tree-sitter";
33
import { SelectionExtractor, SelectionWithContext } from "../typings/Types";
44
import {
55
childRangeSelector,

packages/cursorless-engine/languages/getNodeMatcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { UnsupportedLanguageError } from "@cursorless/common";
2-
import { SyntaxNode } from "web-tree-sitter";
2+
import type { SyntaxNode } from "web-tree-sitter";
33
import { SimpleScopeTypeType } from "@cursorless/common";
44
import {
55
NodeMatcher,

packages/cursorless-engine/languages/getTextFragmentExtractor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Range, UnsupportedLanguageError } from "@cursorless/common";
2-
import { SyntaxNode } from "web-tree-sitter";
2+
import type { SyntaxNode } from "web-tree-sitter";
33
import { SelectionWithEditor } from "../typings/Types";
44
import { notSupported } from "../util/nodeMatchers";
55
import { getNodeInternalRange, getNodeRange } from "../util/nodeSelectors";

packages/cursorless-engine/languages/html.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SyntaxNode } from "web-tree-sitter";
1+
import type { SyntaxNode } from "web-tree-sitter";
22
import { SimpleScopeTypeType } from "@cursorless/common";
33
import { NodeMatcherAlternative, SelectionWithEditor } from "../typings/Types";
44
import { typedNodeFinder } from "../util/nodeFinders";

packages/cursorless-engine/languages/json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SyntaxNode } from "web-tree-sitter";
1+
import type { SyntaxNode } from "web-tree-sitter";
22
import { SimpleScopeTypeType } from "@cursorless/common";
33
import { NodeMatcherAlternative, SelectionWithEditor } from "../typings/Types";
44
import {

packages/cursorless-engine/languages/latex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Range, Selection, TextEditor } from "@cursorless/common";
2-
import { SyntaxNode } from "web-tree-sitter";
2+
import type { SyntaxNode } from "web-tree-sitter";
33
import { SimpleScopeTypeType } from "@cursorless/common";
44
import { NodeMatcherAlternative, SelectionWithContext } from "../typings/Types";
55
import { patternFinder } from "../util/nodeFinders";

packages/cursorless-engine/languages/markdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Range, Selection, TextEditor } from "@cursorless/common";
2-
import { SyntaxNode } from "web-tree-sitter";
2+
import type { SyntaxNode } from "web-tree-sitter";
33
import { getMatchesInRange } from "../util/getMatchesInRange";
44
import { SimpleScopeTypeType } from "@cursorless/common";
55
import {

0 commit comments

Comments
 (0)