ggdgsdbsdbbb / highlight / typescript.v
60 lines · 59 sloc · 819 bytes
Raw
1module highlight
2
3fn init_ts() Lang {
4 return Lang{
5 name: 'TypeScript'
6 lang_extensions: ['ts', 'tsx']
7 line_comments: '//'
8 mline_comments: ['/*', '*/']
9 string_start: ['"', "'"]
10 color: '#2b7489'
11 keywords: [
12 'any',
13 'as',
14 'boolean',
15 'break',
16 'case',
17 'catch',
18 'const',
19 'continue',
20 'do',
21 'else',
22 'enum',
23 'export',
24 'extends',
25 'finally',
26 'for',
27 'function',
28 'get',
29 'if',
30 'implements',
31 'in',
32 'instanceof',
33 'interface',
34 'let',
35 'module',
36 'new',
37 'null',
38 'number',
39 'package',
40 'private',
41 'public',
42 'return',
43 'static',
44 'string',
45 'super',
46 'switch',
47 'this',
48 'throw',
49 'try',
50 'type',
51 'typeof',
52 'var',
53 'void',
54 'while',
55 'yield',
56 'false',
57 'true',
58 ]
59 }
60}
61