UNPKG

1.1 kBTypeScriptView Raw
1export type Keywords = keyof typeof KEYWORDS_TYPES;
2export type KeywordType = 'Call' | 'Modifier' | 'Append' | 'Block';
3export declare function isKeyword(word: string): word is Keywords;
4export declare function isKeyword(word: string, type: KeywordType): boolean;
5/**
6 * This includes the full list of keywords currently in use in the template
7 * language, and where their valid usages are.
8 */
9export declare const KEYWORDS_TYPES: {
10 action: ("Call" | "Modifier")[];
11 component: ("Block" | "Call" | "Append")[];
12 debugger: "Append"[];
13 'each-in': "Block"[];
14 each: "Block"[];
15 'has-block-params': ("Call" | "Append")[];
16 'has-block': ("Call" | "Append")[];
17 helper: ("Call" | "Append")[];
18 if: ("Block" | "Call" | "Append")[];
19 'in-element': "Block"[];
20 let: "Block"[];
21 log: ("Call" | "Append")[];
22 modifier: ("Call" | "Modifier")[];
23 mount: "Append"[];
24 mut: ("Call" | "Append")[];
25 outlet: "Append"[];
26 readonly: ("Call" | "Append")[];
27 unbound: ("Call" | "Append")[];
28 unless: ("Block" | "Call" | "Append")[];
29 yield: "Append"[];
30};