-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmap.ts
More file actions
123 lines (117 loc) · 2.86 KB
/
Copy pathmap.ts
File metadata and controls
123 lines (117 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import type {TokenTypes} from './base';
import type {
RedirectToken,
RedirectTargetToken,
OnlyincludeToken,
IncludeToken,
CommentToken,
ExtToken,
AttributesToken,
AttributeToken,
AtomToken,
ArgToken,
TranscludeToken,
SyntaxToken,
ParameterToken,
HeadingToken,
HtmlToken,
TableToken,
TrToken,
TdToken,
DoubleUnderscoreToken,
HrToken,
LinkToken,
CategoryToken,
FileToken,
ImageParameterToken,
QuoteToken,
ExtLinkToken,
MagicLinkToken,
ListToken,
DdToken,
ConverterToken,
ConverterFlagsToken,
ConverterRuleToken,
TranslateToken,
TvarToken,
HiddenToken,
GalleryImageToken,
ParamLineToken,
ImagemapLinkToken,
CharinsertLineToken,
/* NOT FOR BROWSER */
ListRangeToken,
} from './internal';
export interface TokenTypeMap {
redirect: RedirectToken;
'redirect-syntax': SyntaxToken;
'redirect-target': RedirectTargetToken;
translate: TranslateToken;
'translate-attr': SyntaxToken;
tvar: TvarToken;
'tvar-name': SyntaxToken;
onlyinclude: OnlyincludeToken;
include: IncludeToken;
comment: CommentToken;
ext: ExtToken;
'ext-attrs': AttributesToken;
'ext-attr-dirty': AtomToken;
'ext-attr': AttributeToken;
'attr-key': AtomToken;
arg: ArgToken;
'arg-name': AtomToken;
hidden: HiddenToken;
'magic-word': TranscludeToken;
'magic-word-name': SyntaxToken;
'invoke-function': AtomToken;
'invoke-module': AtomToken;
template: TranscludeToken;
'template-name': AtomToken;
parameter: ParameterToken;
heading: HeadingToken;
'heading-trail': SyntaxToken;
html: HtmlToken;
'html-attrs': AttributesToken;
'html-attr-dirty': AtomToken;
'html-attr': AttributeToken;
table: TableToken;
tr: TrToken;
td: TdToken;
'table-syntax': SyntaxToken;
'table-attrs': AttributesToken;
'table-attr-dirty': AtomToken;
'table-attr': AttributeToken;
hr: HrToken;
'double-underscore': DoubleUnderscoreToken;
link: LinkToken;
'link-target': AtomToken;
category: CategoryToken;
file: FileToken;
'gallery-image': GalleryImageToken;
'imagemap-image': GalleryImageToken;
'image-parameter': ImageParameterToken;
quote: QuoteToken;
'ext-link': ExtLinkToken;
'ext-link-url': MagicLinkToken;
'free-ext-link': MagicLinkToken;
'magic-link': MagicLinkToken;
list: ListToken;
dd: DdToken;
converter: ConverterToken;
'converter-flags': ConverterFlagsToken;
'converter-flag': AtomToken;
'converter-rule': ConverterRuleToken;
'converter-rule-variant': AtomToken;
'param-line': ParamLineToken;
'param-line-key': AtomToken;
'param-line-value': AtomToken;
'imagemap-link': ImagemapLinkToken;
'charinsert-line': CharinsertLineToken;
/* NOT FOR BROWSER */
'list-range': ListRangeToken;
}
export type SelectedTokenTypes = keyof TokenTypeMap;
// Ensure all keys in TokenTypeMap are valid token types
declare type AssertTrue<T extends TokenTypes> = T;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
declare type TokenTypeMapKeyCheck = AssertTrue<SelectedTokenTypes>;