@glimmer/syntax
Version:
31 lines (30 loc) • 1.1 kB
TypeScript
export type Keywords = keyof typeof KEYWORDS_TYPES;
export type KeywordType = 'Call' | 'Modifier' | 'Append' | 'Block';
export declare function isKeyword(word: string): word is Keywords;
export declare function isKeyword(word: string, type: KeywordType): boolean;
/**
* This includes the full list of keywords currently in use in the template
* language, and where their valid usages are.
*/
export declare const KEYWORDS_TYPES: {
action: ("Call" | "Modifier")[];
component: ("Block" | "Call" | "Append")[];
debugger: "Append"[];
'each-in': "Block"[];
each: "Block"[];
'has-block-params': ("Call" | "Append")[];
'has-block': ("Call" | "Append")[];
helper: ("Call" | "Append")[];
if: ("Block" | "Call" | "Append")[];
'in-element': "Block"[];
let: "Block"[];
log: ("Call" | "Append")[];
modifier: ("Call" | "Modifier")[];
mount: "Append"[];
mut: ("Call" | "Append")[];
outlet: "Append"[];
readonly: ("Call" | "Append")[];
unbound: ("Call" | "Append")[];
unless: ("Block" | "Call" | "Append")[];
yield: "Append"[];
};