Skip to content

Commit ff0b053

Browse files
committed
Fixed TypeScript keywords.
Namely, extends, constructor, interface.
1 parent cc9b121 commit ff0b053

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/languages/typescript.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ function(hljs) {
1010
keyword:
1111
'in if for while finally var new function|0 do return void else break catch ' +
1212
'instanceof with throw case default try this switch continue typeof delete ' +
13-
'let yield const class public private get set super interface extends' +
14-
'static constructor implements enum export import declare type protected',
13+
'let yield const class public private get set super ' +
14+
'static implements enum export import declare type protected',
1515
literal:
1616
'true false null undefined NaN Infinity',
1717
built_in:
@@ -86,8 +86,7 @@ function(hljs) {
8686
},
8787
{
8888
className: 'constructor',
89-
begin: 'constructor', end: /\{/, excludeEnd: true,
90-
keywords: KEYWORDS,
89+
beginKeywords: 'constructor', end: /\{/, excludeEnd: true,
9190
relevance: 10
9291
},
9392
{
@@ -96,7 +95,8 @@ function(hljs) {
9695
},
9796
{
9897
className: 'interface',
99-
beginKeywords: 'interface', end: /\{/, excludeEnd: true
98+
beginKeywords: 'interface', end: /\{/, excludeEnd: true,
99+
keywords: 'interface extends'
100100
},
101101
{
102102
begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`

0 commit comments

Comments
 (0)