This document specifies the extensions to the core ESTree AST types to support the ES2018 grammar.
extend interface ForOfStatement {
await: boolean;
}
for-await-of
statements, e.g., for await (const x of xs) {
extend interface ObjectExpression {
properties: [ Property | SpreadElement ];
}
Spread properties, e.g., {a: 1, ...obj, b: 2}
.
extend interface TemplateElement {
value: {
cooked: string | null;
raw: string;
};
}
If the template literal is tagged and the text has an invalid escape, cooked
will be null
, e.g., tag`\unicode and \u{55}`
extend interface ObjectPattern {
properties: [ AssignmentProperty | RestElement ];
}
Rest properties, e.g., {a, ...rest} = obj
.