Skip to content

Commit 87c6b14

Browse files
Update typescript class facets (#3010)
1 parent 21f9b12 commit 87c6b14

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

data/fixtures/scopes/javascript.core/type.class.scope

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
abstract class Foo { }
1+
class Foo {}
22
---
33

44
[Content] =
55
[Removal] =
6-
[Domain] = 0:0-0:22
7-
>----------------------<
8-
0| abstract class Foo { }
6+
[Domain] = 0:0-0:12
7+
>------------<
8+
0| class Foo {}
99

1010
[Insertion delimiter] = " "
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
abstract class Foo {}
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:0-0:21
7+
>---------------------<
8+
0| abstract class Foo {}
9+
10+
[Insertion delimiter] = " "

packages/common/src/scopeSupportFacets/javascript.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = {
168168
"value.iteration.class": supported,
169169
"value.iteration.document": supported,
170170

171-
// JS doesn't have types, but for muscle memory sake we will treat classes the
172-
// same in JS and TS.
173-
"type.class": supported,
174-
175171
"interior.class": supported,
176172
"interior.function": supported,
177173
"interior.constructor": supported,
@@ -272,6 +268,7 @@ export const javascriptScopeSupport: LanguageScopeSupportFacetMap = {
272268
"type.argument.catch": notApplicable,
273269
"type.alias": notApplicable,
274270
"type.cast": notApplicable,
271+
"type.class": notApplicable,
275272
"type.field.class": notApplicable,
276273
"type.field.interface": notApplicable,
277274
"type.foreach": notApplicable,

packages/common/src/scopeSupportFacets/typescript.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const typescriptScopeSupport: LanguageScopeSupportFacetMap = {
1616
"type.argument.catch": supported,
1717
"type.alias": supported,
1818
"type.cast": supported,
19+
"type.class": supported,
1920
"type.field.class": supported,
2021
"type.field.interface": supported,
2122
"type.interface": supported,

0 commit comments

Comments
 (0)