Skip to content

Commit

Permalink
Added call expression types to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson committed Nov 12, 2023
1 parent d981813 commit e3d616e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ initialState:
start: {line: 0, character: 24}
end: {line: 0, character: 30}
finalState:
documentContents: "const foo: = bar<number>(foo);"
documentContents: "const foo: string = bar<>(foo);"
selections:
- anchor: {line: 0, character: 11}
active: {line: 0, character: 11}
- anchor: {line: 0, character: 24}
active: {line: 0, character: 24}
10 changes: 10 additions & 0 deletions queries/typescript.core.scm
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,16 @@
type_arguments: (_)? @type.end
)

;;!! useState<string>()
;;!! useState<Record<string, string>>()
;;! ^^^^^^^^^^^^^^^^^^^^^^
;;! ^^^^^^ ^^^^^^
(call_expression
type_arguments: (type_arguments
(_) @type
)
)

;;!! interface Aaa {}
;;!! type Aaa = Bbb;
(
Expand Down

0 comments on commit e3d616e

Please sign in to comment.