Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions data/fixtures/scopes/typescript.core/type.enum.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
enum Aaa {
bbb,
}
---

[Content] =
[Removal] =
[Domain] = 0:0-2:1
>----------
0| enum Aaa {
1| bbb,
2| }
-<

[Insertion delimiter] = " "
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,10 @@ export const scopeSupportFacetInfos: Record<
description: "An interface declaration",
scopeType: "type",
},
"type.enum": {
description: "An enum declaration",
scopeType: "type",
},
"type.class": {
description: "An class declaration",
scopeType: "type",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export const scopeSupportFacets = [
"type.field.iteration",
"type.foreach",
"type.interface",
"type.enum",
"type.alias",
"type.cast",
"type.class",
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/scopeSupportFacets/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const typescriptScopeSupport: LanguageScopeSupportFacetMap = {
"type.cast": supported,
"type.field": supported,
"type.interface": supported,
"type.enum": supported,
"type.return": supported,
"type.variable": supported,

Expand Down
4 changes: 4 additions & 0 deletions queries/typescript.core.scm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
value: (_) @value
) @_.domain

;;!! enum Aaa {}
;;! ^^^^^^^^^^^
(enum_declaration) @type

;;!! function aaa(bbb: Ccc = "ddd") {}
;;! ^^^-------------
(required_parameter
Expand Down
Loading