Skip to content

Commit a8116ba

Browse files
committed
Changes scope for namespace/module to storage.type to better reflect its semantic meaning
1 parent 82a19fe commit a8116ba

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

TypeScript.YAML-tmLanguage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ repository:
487487

488488
expression-operator:
489489
name: keyword.operator.ts
490-
match: =>|\b(delete|export|import|from|in|instanceof|module|namespace|new|typeof|void|as)\b
490+
match: =>|\b(delete|export|import|from|in|instanceof|new|typeof|void|as)\b
491491

492492
arithmetic-operator:
493493
name: keyword.operator.arithmetic.ts
@@ -507,7 +507,7 @@ repository:
507507

508508
storage-keyword:
509509
name: storage.type.ts
510-
match: \b(number|boolean|string|any|var|let|function|const)\b
510+
match: \b(number|boolean|string|any|var|let|function|const|module|namespace)\b
511511

512512
paren-expression:
513513
begin: \(

TypeScript.tmLanguage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@
408408
<key>expression-operator</key>
409409
<dict>
410410
<key>match</key>
411-
<string>=&gt;|\b(delete|export|import|from|in|instanceof|module|namespace|new|typeof|void|as)\b</string>
411+
<string>=&gt;|\b(delete|export|import|from|in|instanceof|new|typeof|void|as)\b</string>
412412
<key>name</key>
413413
<string>keyword.operator.ts</string>
414414
</dict>
@@ -1241,7 +1241,7 @@
12411241
<key>storage-keyword</key>
12421242
<dict>
12431243
<key>match</key>
1244-
<string>\b(number|boolean|string|any|var|let|function|const)\b</string>
1244+
<string>\b(number|boolean|string|any|var|let|function|const|module|namespace)\b</string>
12451245
<key>name</key>
12461246
<string>storage.type.ts</string>
12471247
</dict>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[1, 1]: source.ts storage.type.ts
2+
[2, 1]: source.ts storage.type.ts
3+
[3, 9]: source.ts storage.type.ts
4+
[4, 9]: source.ts storage.type.ts
5+
[5, 9]: source.ts storage.type.ts

tests/cases/namespaceAndModule.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
^namespace ts { }
2+
^module ts { }
3+
declare ^namespace ts {}
4+
declare ^module ts {}
5+
declare ^module "x" {}

0 commit comments

Comments
 (0)