// Generated by scripts/generate-dts.js. /** * Copyright 2019 Shape Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ type Init = Pick>; export type Node = ArrayAssignmentTarget | ArrayBinding | ArrayExpression | ArrowExpression | AssignmentExpression | AssignmentTargetIdentifier | AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty | AssignmentTargetWithDefault | AwaitExpression | BinaryExpression | BindingIdentifier | BindingPropertyIdentifier | BindingPropertyProperty | BindingWithDefault | Block | BlockStatement | BreakStatement | CallExpression | CatchClause | ClassDeclaration | ClassElement | ClassExpression | CompoundAssignmentExpression | ComputedMemberAssignmentTarget | ComputedMemberExpression | ComputedPropertyName | ConditionalExpression | ContinueStatement | DataProperty | DebuggerStatement | Directive | DoWhileStatement | EmptyStatement | Export | ExportAllFrom | ExportDefault | ExportFrom | ExportFromSpecifier | ExportLocalSpecifier | ExportLocals | ExpressionStatement | ForAwaitStatement | ForInStatement | ForOfStatement | ForStatement | FormalParameters | FunctionBody | FunctionDeclaration | FunctionExpression | Getter | IdentifierExpression | IfStatement | Import | ImportNamespace | ImportSpecifier | LabeledStatement | LiteralBooleanExpression | LiteralInfinityExpression | LiteralNullExpression | LiteralNumericExpression | LiteralRegExpExpression | LiteralStringExpression | Method | Module | NewExpression | NewTargetExpression | ObjectAssignmentTarget | ObjectBinding | ObjectExpression | ReturnStatement | Script | Setter | ShorthandProperty | SpreadElement | SpreadProperty | StaticMemberAssignmentTarget | StaticMemberExpression | StaticPropertyName | Super | SwitchCase | SwitchDefault | SwitchStatement | SwitchStatementWithDefault | TemplateElement | TemplateExpression | ThisExpression | ThrowStatement | TryCatchStatement | TryFinallyStatement | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarationStatement | VariableDeclarator | WhileStatement | WithStatement | YieldExpression | YieldGeneratorExpression; export type Expression = ArrayExpression | ArrowExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ClassExpression | CompoundAssignmentExpression | ConditionalExpression | FunctionExpression | IdentifierExpression | LiteralBooleanExpression | LiteralInfinityExpression | LiteralNullExpression | LiteralNumericExpression | LiteralRegExpExpression | LiteralStringExpression | ComputedMemberExpression | StaticMemberExpression | NewExpression | NewTargetExpression | ObjectExpression | TemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | YieldGeneratorExpression; export type Statement = BlockStatement | BreakStatement | ClassDeclaration | ContinueStatement | DebuggerStatement | EmptyStatement | ExpressionStatement | FunctionDeclaration | IfStatement | DoWhileStatement | ForAwaitStatement | ForInStatement | ForOfStatement | ForStatement | WhileStatement | LabeledStatement | ReturnStatement | SwitchStatement | SwitchStatementWithDefault | ThrowStatement | TryCatchStatement | TryFinallyStatement | VariableDeclarationStatement | WithStatement; export class ArrayAssignmentTarget { type: 'ArrayAssignmentTarget'; elements: Array; rest: ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetIdentifier | ComputedMemberAssignmentTarget | StaticMemberAssignmentTarget | null; constructor(init: Init); } export class ArrayBinding { type: 'ArrayBinding'; elements: Array; rest: BindingIdentifier | ArrayBinding | ObjectBinding | null; constructor(init: Init); } export class ArrayExpression { type: 'ArrayExpression'; elements: Array; constructor(init: Init); } export class ArrowExpression { type: 'ArrowExpression'; isAsync: boolean; params: FormalParameters; body: Expression | FunctionBody; constructor(init: Init); } export class AssignmentExpression { type: 'AssignmentExpression'; binding: ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetIdentifier | ComputedMemberAssignmentTarget | StaticMemberAssignmentTarget; expression: Expression; constructor(init: Init); } export class AssignmentTargetIdentifier { type: 'AssignmentTargetIdentifier'; name: string; constructor(init: Init); } export class AssignmentTargetPropertyIdentifier { type: 'AssignmentTargetPropertyIdentifier'; binding: AssignmentTargetIdentifier; init: Expression | null; constructor(init: Init); } export class AssignmentTargetPropertyProperty { type: 'AssignmentTargetPropertyProperty'; name: ComputedPropertyName | StaticPropertyName; binding: AssignmentTargetWithDefault | ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetIdentifier | ComputedMemberAssignmentTarget | StaticMemberAssignmentTarget; constructor(init: Init); } export class AssignmentTargetWithDefault { type: 'AssignmentTargetWithDefault'; binding: ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetIdentifier | ComputedMemberAssignmentTarget | StaticMemberAssignmentTarget; init: Expression; constructor(init: Init); } export class AwaitExpression { type: 'AwaitExpression'; expression: Expression; constructor(init: Init); } export class BinaryExpression { type: 'BinaryExpression'; left: Expression; operator: '==' | '!=' | '===' | '!==' | '<' | '<=' | '>' | '>=' | 'in' | 'instanceof' | '<<' | '>>' | '>>>' | '+' | '-' | '*' | '/' | '%' | '**' | ',' | '||' | '&&' | '|' | '^' | '&'; right: Expression; constructor(init: Init); } export class BindingIdentifier { type: 'BindingIdentifier'; name: string; constructor(init: Init); } export class BindingPropertyIdentifier { type: 'BindingPropertyIdentifier'; binding: BindingIdentifier; init: Expression | null; constructor(init: Init); } export class BindingPropertyProperty { type: 'BindingPropertyProperty'; name: ComputedPropertyName | StaticPropertyName; binding: BindingWithDefault | BindingIdentifier | ArrayBinding | ObjectBinding; constructor(init: Init); } export class BindingWithDefault { type: 'BindingWithDefault'; binding: BindingIdentifier | ArrayBinding | ObjectBinding; init: Expression; constructor(init: Init); } export class Block { type: 'Block'; statements: Array; constructor(init: Init); } export class BlockStatement { type: 'BlockStatement'; block: Block; constructor(init: Init); } export class BreakStatement { type: 'BreakStatement'; label: string | null; constructor(init: Init); } export class CallExpression { type: 'CallExpression'; callee: Expression | Super; arguments: Array; constructor(init: Init); } export class CatchClause { type: 'CatchClause'; binding: BindingIdentifier | ArrayBinding | ObjectBinding | null; body: Block; constructor(init: Init); } export class ClassDeclaration { type: 'ClassDeclaration'; name: BindingIdentifier; super: Expression | null; elements: Array; constructor(init: Init); } export class ClassElement { type: 'ClassElement'; isStatic: boolean; method: Getter | Method | Setter; constructor(init: Init); } export class ClassExpression { type: 'ClassExpression'; name: BindingIdentifier | null; super: Expression | null; elements: Array; constructor(init: Init); } export class CompoundAssignmentExpression { type: 'CompoundAssignmentExpression'; binding: AssignmentTargetIdentifier | ComputedMemberAssignmentTarget | StaticMemberAssignmentTarget; operator: '+=' | '-=' | '*=' | '/=' | '%=' | '**=' | '<<=' | '>>=' | '>>>=' | '|=' | '^=' | '&='; expression: Expression; constructor(init: Init); } export class ComputedMemberAssignmentTarget { type: 'ComputedMemberAssignmentTarget'; object: Expression | Super; expression: Expression; constructor(init: Init); } export class ComputedMemberExpression { type: 'ComputedMemberExpression'; object: Expression | Super; expression: Expression; constructor(init: Init); } export class ComputedPropertyName { type: 'ComputedPropertyName'; expression: Expression; constructor(init: Init); } export class ConditionalExpression { type: 'ConditionalExpression'; test: Expression; consequent: Expression; alternate: Expression; constructor(init: Init); } export class ContinueStatement { type: 'ContinueStatement'; label: string | null; constructor(init: Init); } export class DataProperty { type: 'DataProperty'; name: ComputedPropertyName | StaticPropertyName; expression: Expression; constructor(init: Init); } export class DebuggerStatement { type: 'DebuggerStatement'; constructor(init?: Init); } export class Directive { type: 'Directive'; rawValue: string; constructor(init: Init); } export class DoWhileStatement { type: 'DoWhileStatement'; body: Statement; test: Expression; constructor(init: Init); } export class EmptyStatement { type: 'EmptyStatement'; constructor(init?: Init); } export class Export { type: 'Export'; declaration: ClassDeclaration | FunctionDeclaration | VariableDeclaration; constructor(init: Init); } export class ExportAllFrom { type: 'ExportAllFrom'; moduleSpecifier: string; constructor(init: Init); } export class ExportDefault { type: 'ExportDefault'; body: ClassDeclaration | Expression | FunctionDeclaration; constructor(init: Init); } export class ExportFrom { type: 'ExportFrom'; namedExports: Array; moduleSpecifier: string; constructor(init: Init); } export class ExportFromSpecifier { type: 'ExportFromSpecifier'; name: string; exportedName: string | null; constructor(init: Init); } export class ExportLocalSpecifier { type: 'ExportLocalSpecifier'; name: IdentifierExpression; exportedName: string | null; constructor(init: Init); } export class ExportLocals { type: 'ExportLocals'; namedExports: Array; constructor(init: Init); } export class ExpressionStatement { type: 'ExpressionStatement'; expression: Expression; constructor(init: Init); } export class ForAwaitStatement { type: 'ForAwaitStatement'; left: ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetIdentifier | ComputedMemberAssignmentTarget | StaticMemberAssignmentTarget | VariableDeclaration; right: Expression; body: Statement; constructor(init: Init); } export class ForInStatement { type: 'ForInStatement'; left: ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetIdentifier | ComputedMemberAssignmentTarget | StaticMemberAssignmentTarget | VariableDeclaration; right: Expression; body: Statement; constructor(init: Init); } export class ForOfStatement { type: 'ForOfStatement'; left: ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetIdentifier | ComputedMemberAssignmentTarget | StaticMemberAssignmentTarget | VariableDeclaration; right: Expression; body: Statement; constructor(init: Init); } export class ForStatement { type: 'ForStatement'; init: Expression | VariableDeclaration | null; test: Expression | null; update: Expression | null; body: Statement; constructor(init: Init); } export class FormalParameters { type: 'FormalParameters'; items: Array; rest: BindingIdentifier | ArrayBinding | ObjectBinding | null; constructor(init: Init); } export class FunctionBody { type: 'FunctionBody'; directives: Array; statements: Array; constructor(init: Init); } export class FunctionDeclaration { type: 'FunctionDeclaration'; isAsync: boolean; isGenerator: boolean; name: BindingIdentifier; params: FormalParameters; body: FunctionBody; constructor(init: Init); } export class FunctionExpression { type: 'FunctionExpression'; isAsync: boolean; isGenerator: boolean; name: BindingIdentifier | null; params: FormalParameters; body: FunctionBody; constructor(init: Init); } export class Getter { type: 'Getter'; name: ComputedPropertyName | StaticPropertyName; body: FunctionBody; constructor(init: Init); } export class IdentifierExpression { type: 'IdentifierExpression'; name: string; constructor(init: Init); } export class IfStatement { type: 'IfStatement'; test: Expression; consequent: Statement; alternate: Statement | null; constructor(init: Init); } export class Import { type: 'Import'; defaultBinding: BindingIdentifier | null; namedImports: Array; moduleSpecifier: string; constructor(init: Init); } export class ImportNamespace { type: 'ImportNamespace'; defaultBinding: BindingIdentifier | null; namespaceBinding: BindingIdentifier; moduleSpecifier: string; constructor(init: Init); } export class ImportSpecifier { type: 'ImportSpecifier'; name: string | null; binding: BindingIdentifier; constructor(init: Init); } export class LabeledStatement { type: 'LabeledStatement'; label: string; body: Statement; constructor(init: Init); } export class LiteralBooleanExpression { type: 'LiteralBooleanExpression'; value: boolean; constructor(init: Init); } export class LiteralInfinityExpression { type: 'LiteralInfinityExpression'; constructor(init?: Init); } export class LiteralNullExpression { type: 'LiteralNullExpression'; constructor(init?: Init); } export class LiteralNumericExpression { type: 'LiteralNumericExpression'; value: number; constructor(init: Init); } export class LiteralRegExpExpression { type: 'LiteralRegExpExpression'; pattern: string; global: boolean; ignoreCase: boolean; multiLine: boolean; dotAll: boolean; unicode: boolean; sticky: boolean; constructor(init: Init); } export class LiteralStringExpression { type: 'LiteralStringExpression'; value: string; constructor(init: Init); } export class Method { type: 'Method'; isAsync: boolean; isGenerator: boolean; name: ComputedPropertyName | StaticPropertyName; params: FormalParameters; body: FunctionBody; constructor(init: Init); } export class Module { type: 'Module'; directives: Array; items: Array; constructor(init: Init); } export class NewExpression { type: 'NewExpression'; callee: Expression; arguments: Array; constructor(init: Init); } export class NewTargetExpression { type: 'NewTargetExpression'; constructor(init?: Init); } export class ObjectAssignmentTarget { type: 'ObjectAssignmentTarget'; properties: Array; rest: AssignmentTargetIdentifier | ComputedMemberAssignmentTarget | StaticMemberAssignmentTarget | null; constructor(init: Init); } export class ObjectBinding { type: 'ObjectBinding'; properties: Array; rest: BindingIdentifier | null; constructor(init: Init); } export class ObjectExpression { type: 'ObjectExpression'; properties: Array; constructor(init: Init); } export class ReturnStatement { type: 'ReturnStatement'; expression: Expression | null; constructor(init: Init); } export class Script { type: 'Script'; directives: Array; statements: Array; constructor(init: Init