-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
es2018-definition.ts
53 lines (48 loc) · 1.26 KB
/
es2018-definition.ts
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
/**
* @fileoverview The AST definition for EcmaScript 2018 snapshot.
*/
import { Extends } from "./lib/extends"
import { NodeRef } from "./lib/node-ref"
import {
Comment,
Definition as ES2017,
IndexRange,
LineColumnRange,
LineColumn,
Token,
} from "./es2017-definition"
export { Comment, IndexRange, LineColumnRange, LineColumn, Token }
export interface Enhancement {
nodes: {
// Enhancements
AssignmentObjectPattern: {
properties: NodeRef<"AssignmentRestProperty">[]
}
BindingObjectPattern: {
properties: NodeRef<"BindingRestProperty">[]
}
ForOfStatement: {
await: boolean
}
ObjectExpression: {
properties: NodeRef<"SpreadElement">[]
}
TemplateElement: {
value: { cooked: null; raw: string }
}
// New others
AssignmentRestProperty: {
type: "RestElement"
argument: NodeRef<"SimpleAssignmentTarget">
}
BindingRestProperty: {
type: "RestElement"
argument: NodeRef<"Identifier">
}
}
}
/**
* The AST definition of ES2018.
*/
interface ES2018 extends Extends<ES2017, Enhancement> {}
export { ES2018 as Definition }