js-deobfuscator
Advanced tools
Comparing version 1.0.19 to 1.0.20
import Node from './node'; | ||
import Edge from "./edge"; | ||
import Edge from './edge'; | ||
export default class Graph { | ||
@@ -4,0 +4,0 @@ nodes: Node[]; |
@@ -18,5 +18,3 @@ "use strict"; | ||
findNode(id) { | ||
return this.nodeMap.has(id) | ||
? this.nodeMap.get(id) | ||
: null; | ||
return this.nodeMap.has(id) ? this.nodeMap.get(id) : null; | ||
} | ||
@@ -35,5 +33,3 @@ /** | ||
findEdge(name) { | ||
return this.edgeMap.has(name) | ||
? this.edgeMap.get(name) | ||
: null; | ||
return this.edgeMap.has(name) ? this.edgeMap.get(name) : null; | ||
} | ||
@@ -40,0 +36,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import Edge from "./edge"; | ||
import Edge from './edge'; | ||
export default class Node { | ||
@@ -3,0 +3,0 @@ private _id; |
@@ -29,5 +29,5 @@ "use strict"; | ||
static isEmptyVariableDeclarationStatement(node) { | ||
return node.type == 'VariableDeclarationStatement' && node.declaration.declarators.length == 0; | ||
return (node.type == 'VariableDeclarationStatement' && node.declaration.declarators.length == 0); | ||
} | ||
} | ||
exports.default = CleanupHelper; |
export var __esModule: boolean; | ||
declare namespace _default { | ||
namespace ArrayAssignmentTarget { | ||
const typeName: string; | ||
const fields: any; | ||
} | ||
namespace ArrayBinding { | ||
const typeName_1: string; | ||
export { typeName_1 as typeName }; | ||
const fields_1: any; | ||
export { fields_1 as fields }; | ||
} | ||
namespace ArrayExpression { | ||
const typeName_2: string; | ||
export { typeName_2 as typeName }; | ||
const fields_2: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_2 as fields }; | ||
} | ||
namespace ArrowExpression { | ||
const typeName_3: string; | ||
export { typeName_3 as typeName }; | ||
const fields_3: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_3 as fields }; | ||
} | ||
namespace AssignmentExpression { | ||
const typeName_4: string; | ||
export { typeName_4 as typeName }; | ||
const fields_4: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_4 as fields }; | ||
} | ||
namespace AssignmentTargetIdentifier { | ||
const typeName_5: string; | ||
export { typeName_5 as typeName }; | ||
const fields_5: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_5 as fields }; | ||
} | ||
namespace AssignmentTargetPropertyIdentifier { | ||
const typeName_6: string; | ||
export { typeName_6 as typeName }; | ||
const fields_6: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_6 as fields }; | ||
} | ||
namespace AssignmentTargetPropertyProperty { | ||
const typeName_7: string; | ||
export { typeName_7 as typeName }; | ||
const fields_7: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_7 as fields }; | ||
} | ||
namespace AssignmentTargetWithDefault { | ||
const typeName_8: string; | ||
export { typeName_8 as typeName }; | ||
const fields_8: any; | ||
export { fields_8 as fields }; | ||
} | ||
namespace AwaitExpression { | ||
const typeName_9: string; | ||
export { typeName_9 as typeName }; | ||
const fields_9: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_9 as fields }; | ||
} | ||
namespace BinaryExpression { | ||
const typeName_10: string; | ||
export { typeName_10 as typeName }; | ||
const fields_10: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
values: string[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_10 as fields }; | ||
} | ||
namespace BindingIdentifier { | ||
const typeName_11: string; | ||
export { typeName_11 as typeName }; | ||
const fields_11: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_11 as fields }; | ||
} | ||
namespace BindingPropertyIdentifier { | ||
const typeName_12: string; | ||
export { typeName_12 as typeName }; | ||
const fields_12: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_12 as fields }; | ||
} | ||
namespace BindingPropertyProperty { | ||
const typeName_13: string; | ||
export { typeName_13 as typeName }; | ||
const fields_13: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_13 as fields }; | ||
} | ||
namespace BindingWithDefault { | ||
const typeName_14: string; | ||
export { typeName_14 as typeName }; | ||
const fields_14: any; | ||
export { fields_14 as fields }; | ||
} | ||
namespace Block { | ||
const typeName_15: string; | ||
export { typeName_15 as typeName }; | ||
const fields_15: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_15 as fields }; | ||
} | ||
namespace BlockStatement { | ||
const typeName_16: string; | ||
export { typeName_16 as typeName }; | ||
const fields_16: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_16 as fields }; | ||
} | ||
namespace BreakStatement { | ||
const typeName_17: string; | ||
export { typeName_17 as typeName }; | ||
const fields_17: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_17 as fields }; | ||
} | ||
namespace CallExpression { | ||
const typeName_18: string; | ||
export { typeName_18 as typeName }; | ||
const fields_18: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_18 as fields }; | ||
} | ||
namespace CatchClause { | ||
const typeName_19: string; | ||
export { typeName_19 as typeName }; | ||
const fields_19: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_19 as fields }; | ||
} | ||
namespace ClassDeclaration { | ||
const typeName_20: string; | ||
export { typeName_20 as typeName }; | ||
const fields_20: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_20 as fields }; | ||
} | ||
namespace ClassElement { | ||
const typeName_21: string; | ||
export { typeName_21 as typeName }; | ||
const fields_21: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_21 as fields }; | ||
} | ||
namespace ClassExpression { | ||
const typeName_22: string; | ||
export { typeName_22 as typeName }; | ||
const fields_22: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_22 as fields }; | ||
} | ||
namespace CompoundAssignmentExpression { | ||
const typeName_23: string; | ||
export { typeName_23 as typeName }; | ||
const fields_23: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
values: string[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_23 as fields }; | ||
} | ||
namespace ComputedMemberAssignmentTarget { | ||
const typeName_24: string; | ||
export { typeName_24 as typeName }; | ||
const fields_24: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_24 as fields }; | ||
} | ||
namespace ComputedMemberExpression { | ||
const typeName_25: string; | ||
export { typeName_25 as typeName }; | ||
const fields_25: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_25 as fields }; | ||
} | ||
namespace ComputedPropertyName { | ||
const typeName_26: string; | ||
export { typeName_26 as typeName }; | ||
const fields_26: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_26 as fields }; | ||
} | ||
namespace ConditionalExpression { | ||
const typeName_27: string; | ||
export { typeName_27 as typeName }; | ||
const fields_27: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_27 as fields }; | ||
} | ||
namespace ContinueStatement { | ||
const typeName_28: string; | ||
export { typeName_28 as typeName }; | ||
const fields_28: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_28 as fields }; | ||
} | ||
namespace DataProperty { | ||
const typeName_29: string; | ||
export { typeName_29 as typeName }; | ||
const fields_29: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_29 as fields }; | ||
} | ||
namespace DebuggerStatement { | ||
const typeName_30: string; | ||
export { typeName_30 as typeName }; | ||
const fields_30: { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
}[]; | ||
export { fields_30 as fields }; | ||
} | ||
namespace Directive { | ||
const typeName_31: string; | ||
export { typeName_31 as typeName }; | ||
const fields_31: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_31 as fields }; | ||
} | ||
namespace DoWhileStatement { | ||
const typeName_32: string; | ||
export { typeName_32 as typeName }; | ||
const fields_32: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_32 as fields }; | ||
} | ||
namespace EmptyStatement { | ||
const typeName_33: string; | ||
export { typeName_33 as typeName }; | ||
const fields_33: { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
}[]; | ||
export { fields_33 as fields }; | ||
} | ||
namespace Export { | ||
const typeName_34: string; | ||
export { typeName_34 as typeName }; | ||
const fields_34: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_34 as fields }; | ||
} | ||
namespace ExportAllFrom { | ||
const typeName_35: string; | ||
export { typeName_35 as typeName }; | ||
const fields_35: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_35 as fields }; | ||
} | ||
namespace ExportDefault { | ||
const typeName_36: string; | ||
export { typeName_36 as typeName }; | ||
const fields_36: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_36 as fields }; | ||
} | ||
namespace ExportFrom { | ||
const typeName_37: string; | ||
export { typeName_37 as typeName }; | ||
const fields_37: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_37 as fields }; | ||
} | ||
namespace ExportFromSpecifier { | ||
const typeName_38: string; | ||
export { typeName_38 as typeName }; | ||
const fields_38: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_38 as fields }; | ||
} | ||
namespace ExportLocalSpecifier { | ||
const typeName_39: string; | ||
export { typeName_39 as typeName }; | ||
const fields_39: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_39 as fields }; | ||
} | ||
namespace ExportLocals { | ||
const typeName_40: string; | ||
export { typeName_40 as typeName }; | ||
const fields_40: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_40 as fields }; | ||
} | ||
namespace ExpressionStatement { | ||
const typeName_41: string; | ||
export { typeName_41 as typeName }; | ||
const fields_41: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_41 as fields }; | ||
} | ||
namespace ForAwaitStatement { | ||
const typeName_42: string; | ||
export { typeName_42 as typeName }; | ||
const fields_42: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_42 as fields }; | ||
} | ||
namespace ForInStatement { | ||
const typeName_43: string; | ||
export { typeName_43 as typeName }; | ||
const fields_43: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_43 as fields }; | ||
} | ||
namespace ForOfStatement { | ||
const typeName_44: string; | ||
export { typeName_44 as typeName }; | ||
const fields_44: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_44 as fields }; | ||
} | ||
namespace ForStatement { | ||
const typeName_45: string; | ||
export { typeName_45 as typeName }; | ||
const fields_45: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_45 as fields }; | ||
} | ||
namespace FormalParameters { | ||
const typeName_46: string; | ||
export { typeName_46 as typeName }; | ||
const fields_46: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_46 as fields }; | ||
} | ||
namespace FunctionBody { | ||
const typeName_47: string; | ||
export { typeName_47 as typeName }; | ||
const fields_47: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_47 as fields }; | ||
} | ||
namespace FunctionDeclaration { | ||
const typeName_48: string; | ||
export { typeName_48 as typeName }; | ||
const fields_48: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_48 as fields }; | ||
} | ||
namespace FunctionExpression { | ||
const typeName_49: string; | ||
export { typeName_49 as typeName }; | ||
const fields_49: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_49 as fields }; | ||
} | ||
namespace Getter { | ||
const typeName_50: string; | ||
export { typeName_50 as typeName }; | ||
const fields_50: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_50 as fields }; | ||
} | ||
namespace IdentifierExpression { | ||
const typeName_51: string; | ||
export { typeName_51 as typeName }; | ||
const fields_51: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_51 as fields }; | ||
} | ||
namespace IfStatement { | ||
const typeName_52: string; | ||
export { typeName_52 as typeName }; | ||
const fields_52: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_52 as fields }; | ||
} | ||
namespace Import { | ||
const typeName_53: string; | ||
export { typeName_53 as typeName }; | ||
const fields_53: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_53 as fields }; | ||
} | ||
namespace ImportNamespace { | ||
const typeName_54: string; | ||
export { typeName_54 as typeName }; | ||
const fields_54: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_54 as fields }; | ||
} | ||
namespace ImportSpecifier { | ||
const typeName_55: string; | ||
export { typeName_55 as typeName }; | ||
const fields_55: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_55 as fields }; | ||
} | ||
namespace LabeledStatement { | ||
const typeName_56: string; | ||
export { typeName_56 as typeName }; | ||
const fields_56: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_56 as fields }; | ||
} | ||
namespace LiteralBooleanExpression { | ||
const typeName_57: string; | ||
export { typeName_57 as typeName }; | ||
const fields_57: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_57 as fields }; | ||
} | ||
namespace LiteralInfinityExpression { | ||
const typeName_58: string; | ||
export { typeName_58 as typeName }; | ||
const fields_58: { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
}[]; | ||
export { fields_58 as fields }; | ||
} | ||
namespace LiteralNullExpression { | ||
const typeName_59: string; | ||
export { typeName_59 as typeName }; | ||
const fields_59: { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
}[]; | ||
export { fields_59 as fields }; | ||
} | ||
namespace LiteralNumericExpression { | ||
const typeName_60: string; | ||
export { typeName_60 as typeName }; | ||
const fields_60: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_60 as fields }; | ||
} | ||
namespace LiteralRegExpExpression { | ||
const typeName_61: string; | ||
export { typeName_61 as typeName }; | ||
const fields_61: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_61 as fields }; | ||
} | ||
namespace LiteralStringExpression { | ||
const typeName_62: string; | ||
export { typeName_62 as typeName }; | ||
const fields_62: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_62 as fields }; | ||
} | ||
namespace Method { | ||
const typeName_63: string; | ||
export { typeName_63 as typeName }; | ||
const fields_63: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_63 as fields }; | ||
} | ||
namespace Module { | ||
const typeName_64: string; | ||
export { typeName_64 as typeName }; | ||
const fields_64: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_64 as fields }; | ||
} | ||
namespace NewExpression { | ||
const typeName_65: string; | ||
export { typeName_65 as typeName }; | ||
const fields_65: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_65 as fields }; | ||
} | ||
namespace NewTargetExpression { | ||
const typeName_66: string; | ||
export { typeName_66 as typeName }; | ||
const fields_66: { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
}[]; | ||
export { fields_66 as fields }; | ||
} | ||
namespace ObjectAssignmentTarget { | ||
const typeName_67: string; | ||
export { typeName_67 as typeName }; | ||
const fields_67: any; | ||
export { fields_67 as fields }; | ||
} | ||
namespace ObjectBinding { | ||
const typeName_68: string; | ||
export { typeName_68 as typeName }; | ||
const fields_68: any; | ||
export { fields_68 as fields }; | ||
} | ||
namespace ObjectExpression { | ||
const typeName_69: string; | ||
export { typeName_69 as typeName }; | ||
const fields_69: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_69 as fields }; | ||
} | ||
namespace ReturnStatement { | ||
const typeName_70: string; | ||
export { typeName_70 as typeName }; | ||
const fields_70: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_70 as fields }; | ||
} | ||
namespace Script { | ||
const typeName_71: string; | ||
export { typeName_71 as typeName }; | ||
const fields_71: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_71 as fields }; | ||
} | ||
namespace Setter { | ||
const typeName_72: string; | ||
export { typeName_72 as typeName }; | ||
const fields_72: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_72 as fields }; | ||
} | ||
namespace ShorthandProperty { | ||
const typeName_73: string; | ||
export { typeName_73 as typeName }; | ||
const fields_73: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_73 as fields }; | ||
} | ||
namespace SpreadElement { | ||
const typeName_74: string; | ||
export { typeName_74 as typeName }; | ||
const fields_74: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_74 as fields }; | ||
} | ||
namespace SpreadProperty { | ||
const typeName_75: string; | ||
export { typeName_75 as typeName }; | ||
const fields_75: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_75 as fields }; | ||
} | ||
namespace StaticMemberAssignmentTarget { | ||
const typeName_76: string; | ||
export { typeName_76 as typeName }; | ||
const fields_76: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_76 as fields }; | ||
} | ||
namespace StaticMemberExpression { | ||
const typeName_77: string; | ||
export { typeName_77 as typeName }; | ||
const fields_77: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_77 as fields }; | ||
} | ||
namespace StaticPropertyName { | ||
const typeName_78: string; | ||
export { typeName_78 as typeName }; | ||
const fields_78: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_78 as fields }; | ||
} | ||
namespace Super { | ||
const typeName_79: string; | ||
export { typeName_79 as typeName }; | ||
const fields_79: { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
}[]; | ||
export { fields_79 as fields }; | ||
} | ||
namespace SwitchCase { | ||
const typeName_80: string; | ||
export { typeName_80 as typeName }; | ||
const fields_80: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_80 as fields }; | ||
} | ||
namespace SwitchDefault { | ||
const typeName_81: string; | ||
export { typeName_81 as typeName }; | ||
const fields_81: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_81 as fields }; | ||
} | ||
namespace SwitchStatement { | ||
const typeName_82: string; | ||
export { typeName_82 as typeName }; | ||
const fields_82: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_82 as fields }; | ||
} | ||
namespace SwitchStatementWithDefault { | ||
const typeName_83: string; | ||
export { typeName_83 as typeName }; | ||
const fields_83: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_83 as fields }; | ||
} | ||
namespace TemplateElement { | ||
const typeName_84: string; | ||
export { typeName_84 as typeName }; | ||
const fields_84: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_84 as fields }; | ||
} | ||
namespace TemplateExpression { | ||
const typeName_85: string; | ||
export { typeName_85 as typeName }; | ||
const fields_85: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_85 as fields }; | ||
} | ||
namespace ThisExpression { | ||
const typeName_86: string; | ||
export { typeName_86 as typeName }; | ||
const fields_86: { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
}[]; | ||
export { fields_86 as fields }; | ||
} | ||
namespace ThrowStatement { | ||
const typeName_87: string; | ||
export { typeName_87 as typeName }; | ||
const fields_87: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_87 as fields }; | ||
} | ||
namespace TryCatchStatement { | ||
const typeName_88: string; | ||
export { typeName_88 as typeName }; | ||
const fields_88: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_88 as fields }; | ||
} | ||
namespace TryFinallyStatement { | ||
const typeName_89: string; | ||
export { typeName_89 as typeName }; | ||
const fields_89: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_89 as fields }; | ||
} | ||
namespace UnaryExpression { | ||
const typeName_90: string; | ||
export { typeName_90 as typeName }; | ||
const fields_90: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
values: string[]; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_90 as fields }; | ||
} | ||
namespace UpdateExpression { | ||
const typeName_91: string; | ||
export { typeName_91 as typeName }; | ||
const fields_91: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_91 as fields }; | ||
} | ||
namespace VariableDeclaration { | ||
const typeName_92: string; | ||
export { typeName_92 as typeName }; | ||
const fields_92: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
values: string[]; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_92 as fields }; | ||
} | ||
namespace VariableDeclarationStatement { | ||
const typeName_93: string; | ||
export { typeName_93 as typeName }; | ||
const fields_93: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: {}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_93 as fields }; | ||
} | ||
namespace VariableDeclarator { | ||
const typeName_94: string; | ||
export { typeName_94 as typeName }; | ||
const fields_94: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_94 as fields }; | ||
} | ||
namespace WhileStatement { | ||
const typeName_95: string; | ||
export { typeName_95 as typeName }; | ||
const fields_95: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_95 as fields }; | ||
} | ||
namespace WithStatement { | ||
const typeName_96: string; | ||
export { typeName_96 as typeName }; | ||
const fields_96: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_96 as fields }; | ||
} | ||
namespace YieldExpression { | ||
const typeName_97: string; | ||
export { typeName_97 as typeName }; | ||
const fields_97: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_97 as fields }; | ||
} | ||
namespace YieldGeneratorExpression { | ||
const typeName_98: string; | ||
export { typeName_98 as typeName }; | ||
const fields_98: ({ | ||
name: string; | ||
type: { | ||
typeName: string; | ||
argument: any; | ||
}; | ||
value: string; | ||
} | { | ||
name: string; | ||
type: { | ||
typeName: string; | ||
arguments: never[]; | ||
}; | ||
value?: undefined; | ||
})[]; | ||
export { fields_98 as fields }; | ||
} | ||
const ArrayAssignmentTarget: {}; | ||
const ArrayBinding: {}; | ||
const ArrayExpression: {}; | ||
const ArrowExpression: {}; | ||
const AssignmentExpression: {}; | ||
const AssignmentTargetIdentifier: {}; | ||
const AssignmentTargetPropertyIdentifier: {}; | ||
const AssignmentTargetPropertyProperty: {}; | ||
const AssignmentTargetWithDefault: {}; | ||
const AwaitExpression: {}; | ||
const BinaryExpression: {}; | ||
const BindingIdentifier: {}; | ||
const BindingPropertyIdentifier: {}; | ||
const BindingPropertyProperty: {}; | ||
const BindingWithDefault: {}; | ||
const Block: {}; | ||
const BlockStatement: {}; | ||
const BreakStatement: {}; | ||
const CallExpression: {}; | ||
const CatchClause: {}; | ||
const ClassDeclaration: {}; | ||
const ClassElement: {}; | ||
const ClassExpression: {}; | ||
const CompoundAssignmentExpression: {}; | ||
const ComputedMemberAssignmentTarget: {}; | ||
const ComputedMemberExpression: {}; | ||
const ComputedPropertyName: {}; | ||
const ConditionalExpression: {}; | ||
const ContinueStatement: {}; | ||
const DataProperty: {}; | ||
const DebuggerStatement: {}; | ||
const Directive: {}; | ||
const DoWhileStatement: {}; | ||
const EmptyStatement: {}; | ||
const Export: {}; | ||
const ExportAllFrom: {}; | ||
const ExportDefault: {}; | ||
const ExportFrom: {}; | ||
const ExportFromSpecifier: {}; | ||
const ExportLocalSpecifier: {}; | ||
const ExportLocals: {}; | ||
const ExpressionStatement: {}; | ||
const ForAwaitStatement: {}; | ||
const ForInStatement: {}; | ||
const ForOfStatement: {}; | ||
const ForStatement: {}; | ||
const FormalParameters: {}; | ||
const FunctionBody: {}; | ||
const FunctionDeclaration: {}; | ||
const FunctionExpression: {}; | ||
const Getter: {}; | ||
const IdentifierExpression: {}; | ||
const IfStatement: {}; | ||
const Import: {}; | ||
const ImportNamespace: {}; | ||
const ImportSpecifier: {}; | ||
const LabeledStatement: {}; | ||
const LiteralBooleanExpression: {}; | ||
const LiteralInfinityExpression: {}; | ||
const LiteralNullExpression: {}; | ||
const LiteralNumericExpression: {}; | ||
const LiteralRegExpExpression: {}; | ||
const LiteralStringExpression: {}; | ||
const Method: {}; | ||
const Module: {}; | ||
const NewExpression: {}; | ||
const NewTargetExpression: {}; | ||
const ObjectAssignmentTarget: {}; | ||
const ObjectBinding: {}; | ||
const ObjectExpression: {}; | ||
const ReturnStatement: {}; | ||
const Script: {}; | ||
const Setter: {}; | ||
const ShorthandProperty: {}; | ||
const SpreadElement: {}; | ||
const SpreadProperty: {}; | ||
const StaticMemberAssignmentTarget: {}; | ||
const StaticMemberExpression: {}; | ||
const StaticPropertyName: {}; | ||
const Super: {}; | ||
const SwitchCase: {}; | ||
const SwitchDefault: {}; | ||
const SwitchStatement: {}; | ||
const SwitchStatementWithDefault: {}; | ||
const TemplateElement: {}; | ||
const TemplateExpression: {}; | ||
const ThisExpression: {}; | ||
const ThrowStatement: {}; | ||
const TryCatchStatement: {}; | ||
const TryFinallyStatement: {}; | ||
const UnaryExpression: {}; | ||
const UpdateExpression: {}; | ||
const VariableDeclaration: {}; | ||
const VariableDeclarationStatement: {}; | ||
const VariableDeclarator: {}; | ||
const WhileStatement: {}; | ||
const WithStatement: {}; | ||
const YieldExpression: {}; | ||
const YieldGeneratorExpression: {}; | ||
} | ||
export default _default; |
"use strict"; | ||
// Generated by src/generate-spec.js. | ||
// Generated by src/generate-spec.js. | ||
/** | ||
@@ -19,3 +19,3 @@ * Copyright 2016 Shape Security, Inc. | ||
// Hack to make Babel6 import this as a module. | ||
Object.defineProperty(exports, "__esModule", { | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
@@ -25,132 +25,266 @@ }); | ||
var SPEC = {}; | ||
var BOOLEAN = { typeName: "Boolean" }; | ||
var DOUBLE = { typeName: "Number" }; | ||
var STRING = { typeName: "String" }; | ||
function Maybe(arg) { return { typeName: "Maybe", argument: arg }; } | ||
function List(arg) { return { typeName: "List", argument: arg }; } | ||
function Const(arg) { return { typeName: "Const", argument: arg }; } | ||
function Union() { return { typeName: "Union", arguments: [].slice.call(arguments, 0) }; } | ||
var BOOLEAN = { typeName: 'Boolean' }; | ||
var DOUBLE = { typeName: 'Number' }; | ||
var STRING = { typeName: 'String' }; | ||
function Maybe(arg) { | ||
return { typeName: 'Maybe', argument: arg }; | ||
} | ||
function List(arg) { | ||
return { typeName: 'List', argument: arg }; | ||
} | ||
function Const(arg) { | ||
return { typeName: 'Const', argument: arg }; | ||
} | ||
function Union() { | ||
return { typeName: 'Union', arguments: [].slice.call(arguments, 0) }; | ||
} | ||
var TYPE_INDICATOR = { | ||
typeName: "Enum", | ||
values: ["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"] | ||
typeName: 'Enum', | ||
values: [ | ||
'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' | ||
] | ||
}; | ||
var BinaryOperator = { | ||
typeName: "Enum", | ||
values: ["==", "!=", "===", "!==", "<", "<=", ">", ">=", "in", "instanceof", "<<", ">>", ">>>", "+", "-", "*", "/", "%", "**", ",", "||", "&&", "|", "^", "&"] | ||
typeName: 'Enum', | ||
values: [ | ||
'==', | ||
'!=', | ||
'===', | ||
'!==', | ||
'<', | ||
'<=', | ||
'>', | ||
'>=', | ||
'in', | ||
'instanceof', | ||
'<<', | ||
'>>', | ||
'>>>', | ||
'+', | ||
'-', | ||
'*', | ||
'/', | ||
'%', | ||
'**', | ||
',', | ||
'||', | ||
'&&', | ||
'|', | ||
'^', | ||
'&' | ||
] | ||
}; | ||
var CompoundAssignmentOperator = { | ||
typeName: "Enum", | ||
values: ["+=", "-=", "*=", "/=", "%=", "**=", "<<=", ">>=", ">>>=", "|=", "^=", "&="] | ||
typeName: 'Enum', | ||
values: ['+=', '-=', '*=', '/=', '%=', '**=', '<<=', '>>=', '>>>=', '|=', '^=', '&='] | ||
}; | ||
var UnaryOperator = { | ||
typeName: "Enum", | ||
values: ["+", "-", "!", "~", "typeof", "void", "delete"] | ||
typeName: 'Enum', | ||
values: ['+', '-', '!', '~', 'typeof', 'void', 'delete'] | ||
}; | ||
var UpdateOperator = { | ||
typeName: "Enum", | ||
values: ["++", "--"] | ||
typeName: 'Enum', | ||
values: ['++', '--'] | ||
}; | ||
var VariableDeclarationKind = { | ||
typeName: "Enum", | ||
values: ["var", "let", "const"] | ||
typeName: 'Enum', | ||
values: ['var', 'let', 'const'] | ||
}; | ||
var ArrayAssignmentTarget = SPEC.ArrayAssignmentTarget = {}; | ||
var ArrayBinding = SPEC.ArrayBinding = {}; | ||
var ArrayExpression = SPEC.ArrayExpression = {}; | ||
var ArrowExpression = SPEC.ArrowExpression = {}; | ||
var AssignmentExpression = SPEC.AssignmentExpression = {}; | ||
var AssignmentTargetIdentifier = SPEC.AssignmentTargetIdentifier = {}; | ||
var AssignmentTargetPropertyIdentifier = SPEC.AssignmentTargetPropertyIdentifier = {}; | ||
var AssignmentTargetPropertyProperty = SPEC.AssignmentTargetPropertyProperty = {}; | ||
var AssignmentTargetWithDefault = SPEC.AssignmentTargetWithDefault = {}; | ||
var AwaitExpression = SPEC.AwaitExpression = {}; | ||
var BinaryExpression = SPEC.BinaryExpression = {}; | ||
var BindingIdentifier = SPEC.BindingIdentifier = {}; | ||
var BindingPropertyIdentifier = SPEC.BindingPropertyIdentifier = {}; | ||
var BindingPropertyProperty = SPEC.BindingPropertyProperty = {}; | ||
var BindingWithDefault = SPEC.BindingWithDefault = {}; | ||
var Block = SPEC.Block = {}; | ||
var BlockStatement = SPEC.BlockStatement = {}; | ||
var BreakStatement = SPEC.BreakStatement = {}; | ||
var CallExpression = SPEC.CallExpression = {}; | ||
var CatchClause = SPEC.CatchClause = {}; | ||
var ClassDeclaration = SPEC.ClassDeclaration = {}; | ||
var ClassElement = SPEC.ClassElement = {}; | ||
var ClassExpression = SPEC.ClassExpression = {}; | ||
var CompoundAssignmentExpression = SPEC.CompoundAssignmentExpression = {}; | ||
var ComputedMemberAssignmentTarget = SPEC.ComputedMemberAssignmentTarget = {}; | ||
var ComputedMemberExpression = SPEC.ComputedMemberExpression = {}; | ||
var ComputedPropertyName = SPEC.ComputedPropertyName = {}; | ||
var ConditionalExpression = SPEC.ConditionalExpression = {}; | ||
var ContinueStatement = SPEC.ContinueStatement = {}; | ||
var DataProperty = SPEC.DataProperty = {}; | ||
var DebuggerStatement = SPEC.DebuggerStatement = {}; | ||
var Directive = SPEC.Directive = {}; | ||
var DoWhileStatement = SPEC.DoWhileStatement = {}; | ||
var EmptyStatement = SPEC.EmptyStatement = {}; | ||
var Export = SPEC.Export = {}; | ||
var ExportAllFrom = SPEC.ExportAllFrom = {}; | ||
var ExportDefault = SPEC.ExportDefault = {}; | ||
var ExportFrom = SPEC.ExportFrom = {}; | ||
var ExportFromSpecifier = SPEC.ExportFromSpecifier = {}; | ||
var ExportLocalSpecifier = SPEC.ExportLocalSpecifier = {}; | ||
var ExportLocals = SPEC.ExportLocals = {}; | ||
var ExpressionStatement = SPEC.ExpressionStatement = {}; | ||
var ForAwaitStatement = SPEC.ForAwaitStatement = {}; | ||
var ForInStatement = SPEC.ForInStatement = {}; | ||
var ForOfStatement = SPEC.ForOfStatement = {}; | ||
var ForStatement = SPEC.ForStatement = {}; | ||
var FormalParameters = SPEC.FormalParameters = {}; | ||
var FunctionBody = SPEC.FunctionBody = {}; | ||
var FunctionDeclaration = SPEC.FunctionDeclaration = {}; | ||
var FunctionExpression = SPEC.FunctionExpression = {}; | ||
var Getter = SPEC.Getter = {}; | ||
var IdentifierExpression = SPEC.IdentifierExpression = {}; | ||
var IfStatement = SPEC.IfStatement = {}; | ||
var Import = SPEC.Import = {}; | ||
var ImportNamespace = SPEC.ImportNamespace = {}; | ||
var ImportSpecifier = SPEC.ImportSpecifier = {}; | ||
var LabeledStatement = SPEC.LabeledStatement = {}; | ||
var LiteralBooleanExpression = SPEC.LiteralBooleanExpression = {}; | ||
var LiteralInfinityExpression = SPEC.LiteralInfinityExpression = {}; | ||
var LiteralNullExpression = SPEC.LiteralNullExpression = {}; | ||
var LiteralNumericExpression = SPEC.LiteralNumericExpression = {}; | ||
var LiteralRegExpExpression = SPEC.LiteralRegExpExpression = {}; | ||
var LiteralStringExpression = SPEC.LiteralStringExpression = {}; | ||
var Method = SPEC.Method = {}; | ||
var Module = SPEC.Module = {}; | ||
var NewExpression = SPEC.NewExpression = {}; | ||
var NewTargetExpression = SPEC.NewTargetExpression = {}; | ||
var ObjectAssignmentTarget = SPEC.ObjectAssignmentTarget = {}; | ||
var ObjectBinding = SPEC.ObjectBinding = {}; | ||
var ObjectExpression = SPEC.ObjectExpression = {}; | ||
var ReturnStatement = SPEC.ReturnStatement = {}; | ||
var Script = SPEC.Script = {}; | ||
var Setter = SPEC.Setter = {}; | ||
var ShorthandProperty = SPEC.ShorthandProperty = {}; | ||
var SpreadElement = SPEC.SpreadElement = {}; | ||
var SpreadProperty = SPEC.SpreadProperty = {}; | ||
var StaticMemberAssignmentTarget = SPEC.StaticMemberAssignmentTarget = {}; | ||
var StaticMemberExpression = SPEC.StaticMemberExpression = {}; | ||
var StaticPropertyName = SPEC.StaticPropertyName = {}; | ||
var Super = SPEC.Super = {}; | ||
var SwitchCase = SPEC.SwitchCase = {}; | ||
var SwitchDefault = SPEC.SwitchDefault = {}; | ||
var SwitchStatement = SPEC.SwitchStatement = {}; | ||
var SwitchStatementWithDefault = SPEC.SwitchStatementWithDefault = {}; | ||
var TemplateElement = SPEC.TemplateElement = {}; | ||
var TemplateExpression = SPEC.TemplateExpression = {}; | ||
var ThisExpression = SPEC.ThisExpression = {}; | ||
var ThrowStatement = SPEC.ThrowStatement = {}; | ||
var TryCatchStatement = SPEC.TryCatchStatement = {}; | ||
var TryFinallyStatement = SPEC.TryFinallyStatement = {}; | ||
var UnaryExpression = SPEC.UnaryExpression = {}; | ||
var UpdateExpression = SPEC.UpdateExpression = {}; | ||
var VariableDeclaration = SPEC.VariableDeclaration = {}; | ||
var VariableDeclarationStatement = SPEC.VariableDeclarationStatement = {}; | ||
var VariableDeclarator = SPEC.VariableDeclarator = {}; | ||
var WhileStatement = SPEC.WhileStatement = {}; | ||
var WithStatement = SPEC.WithStatement = {}; | ||
var YieldExpression = SPEC.YieldExpression = {}; | ||
var YieldGeneratorExpression = SPEC.YieldGeneratorExpression = {}; | ||
var ArrayAssignmentTarget = (SPEC.ArrayAssignmentTarget = {}); | ||
var ArrayBinding = (SPEC.ArrayBinding = {}); | ||
var ArrayExpression = (SPEC.ArrayExpression = {}); | ||
var ArrowExpression = (SPEC.ArrowExpression = {}); | ||
var AssignmentExpression = (SPEC.AssignmentExpression = {}); | ||
var AssignmentTargetIdentifier = (SPEC.AssignmentTargetIdentifier = {}); | ||
var AssignmentTargetPropertyIdentifier = (SPEC.AssignmentTargetPropertyIdentifier = {}); | ||
var AssignmentTargetPropertyProperty = (SPEC.AssignmentTargetPropertyProperty = {}); | ||
var AssignmentTargetWithDefault = (SPEC.AssignmentTargetWithDefault = {}); | ||
var AwaitExpression = (SPEC.AwaitExpression = {}); | ||
var BinaryExpression = (SPEC.BinaryExpression = {}); | ||
var BindingIdentifier = (SPEC.BindingIdentifier = {}); | ||
var BindingPropertyIdentifier = (SPEC.BindingPropertyIdentifier = {}); | ||
var BindingPropertyProperty = (SPEC.BindingPropertyProperty = {}); | ||
var BindingWithDefault = (SPEC.BindingWithDefault = {}); | ||
var Block = (SPEC.Block = {}); | ||
var BlockStatement = (SPEC.BlockStatement = {}); | ||
var BreakStatement = (SPEC.BreakStatement = {}); | ||
var CallExpression = (SPEC.CallExpression = {}); | ||
var CatchClause = (SPEC.CatchClause = {}); | ||
var ClassDeclaration = (SPEC.ClassDeclaration = {}); | ||
var ClassElement = (SPEC.ClassElement = {}); | ||
var ClassExpression = (SPEC.ClassExpression = {}); | ||
var CompoundAssignmentExpression = (SPEC.CompoundAssignmentExpression = {}); | ||
var ComputedMemberAssignmentTarget = (SPEC.ComputedMemberAssignmentTarget = {}); | ||
var ComputedMemberExpression = (SPEC.ComputedMemberExpression = {}); | ||
var ComputedPropertyName = (SPEC.ComputedPropertyName = {}); | ||
var ConditionalExpression = (SPEC.ConditionalExpression = {}); | ||
var ContinueStatement = (SPEC.ContinueStatement = {}); | ||
var DataProperty = (SPEC.DataProperty = {}); | ||
var DebuggerStatement = (SPEC.DebuggerStatement = {}); | ||
var Directive = (SPEC.Directive = {}); | ||
var DoWhileStatement = (SPEC.DoWhileStatement = {}); | ||
var EmptyStatement = (SPEC.EmptyStatement = {}); | ||
var Export = (SPEC.Export = {}); | ||
var ExportAllFrom = (SPEC.ExportAllFrom = {}); | ||
var ExportDefault = (SPEC.ExportDefault = {}); | ||
var ExportFrom = (SPEC.ExportFrom = {}); | ||
var ExportFromSpecifier = (SPEC.ExportFromSpecifier = {}); | ||
var ExportLocalSpecifier = (SPEC.ExportLocalSpecifier = {}); | ||
var ExportLocals = (SPEC.ExportLocals = {}); | ||
var ExpressionStatement = (SPEC.ExpressionStatement = {}); | ||
var ForAwaitStatement = (SPEC.ForAwaitStatement = {}); | ||
var ForInStatement = (SPEC.ForInStatement = {}); | ||
var ForOfStatement = (SPEC.ForOfStatement = {}); | ||
var ForStatement = (SPEC.ForStatement = {}); | ||
var FormalParameters = (SPEC.FormalParameters = {}); | ||
var FunctionBody = (SPEC.FunctionBody = {}); | ||
var FunctionDeclaration = (SPEC.FunctionDeclaration = {}); | ||
var FunctionExpression = (SPEC.FunctionExpression = {}); | ||
var Getter = (SPEC.Getter = {}); | ||
var IdentifierExpression = (SPEC.IdentifierExpression = {}); | ||
var IfStatement = (SPEC.IfStatement = {}); | ||
var Import = (SPEC.Import = {}); | ||
var ImportNamespace = (SPEC.ImportNamespace = {}); | ||
var ImportSpecifier = (SPEC.ImportSpecifier = {}); | ||
var LabeledStatement = (SPEC.LabeledStatement = {}); | ||
var LiteralBooleanExpression = (SPEC.LiteralBooleanExpression = {}); | ||
var LiteralInfinityExpression = (SPEC.LiteralInfinityExpression = {}); | ||
var LiteralNullExpression = (SPEC.LiteralNullExpression = {}); | ||
var LiteralNumericExpression = (SPEC.LiteralNumericExpression = {}); | ||
var LiteralRegExpExpression = (SPEC.LiteralRegExpExpression = {}); | ||
var LiteralStringExpression = (SPEC.LiteralStringExpression = {}); | ||
var Method = (SPEC.Method = {}); | ||
var Module = (SPEC.Module = {}); | ||
var NewExpression = (SPEC.NewExpression = {}); | ||
var NewTargetExpression = (SPEC.NewTargetExpression = {}); | ||
var ObjectAssignmentTarget = (SPEC.ObjectAssignmentTarget = {}); | ||
var ObjectBinding = (SPEC.ObjectBinding = {}); | ||
var ObjectExpression = (SPEC.ObjectExpression = {}); | ||
var ReturnStatement = (SPEC.ReturnStatement = {}); | ||
var Script = (SPEC.Script = {}); | ||
var Setter = (SPEC.Setter = {}); | ||
var ShorthandProperty = (SPEC.ShorthandProperty = {}); | ||
var SpreadElement = (SPEC.SpreadElement = {}); | ||
var SpreadProperty = (SPEC.SpreadProperty = {}); | ||
var StaticMemberAssignmentTarget = (SPEC.StaticMemberAssignmentTarget = {}); | ||
var StaticMemberExpression = (SPEC.StaticMemberExpression = {}); | ||
var StaticPropertyName = (SPEC.StaticPropertyName = {}); | ||
var Super = (SPEC.Super = {}); | ||
var SwitchCase = (SPEC.SwitchCase = {}); | ||
var SwitchDefault = (SPEC.SwitchDefault = {}); | ||
var SwitchStatement = (SPEC.SwitchStatement = {}); | ||
var SwitchStatementWithDefault = (SPEC.SwitchStatementWithDefault = {}); | ||
var TemplateElement = (SPEC.TemplateElement = {}); | ||
var TemplateExpression = (SPEC.TemplateExpression = {}); | ||
var ThisExpression = (SPEC.ThisExpression = {}); | ||
var ThrowStatement = (SPEC.ThrowStatement = {}); | ||
var TryCatchStatement = (SPEC.TryCatchStatement = {}); | ||
var TryFinallyStatement = (SPEC.TryFinallyStatement = {}); | ||
var UnaryExpression = (SPEC.UnaryExpression = {}); | ||
var UpdateExpression = (SPEC.UpdateExpression = {}); | ||
var VariableDeclaration = (SPEC.VariableDeclaration = {}); | ||
var VariableDeclarationStatement = (SPEC.VariableDeclarationStatement = {}); | ||
var VariableDeclarator = (SPEC.VariableDeclarator = {}); | ||
var WhileStatement = (SPEC.WhileStatement = {}); | ||
var WithStatement = (SPEC.WithStatement = {}); | ||
var YieldExpression = (SPEC.YieldExpression = {}); | ||
var YieldGeneratorExpression = (SPEC.YieldGeneratorExpression = {}); | ||
var AssignmentTargetProperty = Union(AssignmentTargetPropertyIdentifier, AssignmentTargetPropertyProperty); | ||
@@ -174,585 +308,763 @@ var BindingProperty = Union(BindingPropertyIdentifier, BindingPropertyProperty); | ||
var Node = Union(ArrayAssignmentTarget, ArrayBinding, AssignmentTargetProperty, AssignmentTargetWithDefault, BindingProperty, BindingWithDefault, Block, CatchClause, ClassElement, Directive, ExportDeclaration, ExportFromSpecifier, ExportLocalSpecifier, Expression, FormalParameters, FunctionBody, ImportDeclaration, ImportSpecifier, MemberAssignmentTarget, ObjectAssignmentTarget, ObjectBinding, ObjectProperty, Program, PropertyName, SpreadElement, Statement, Super, SwitchCase, SwitchDefault, TemplateElement, VariableDeclaration, VariableDeclarator, VariableReference); | ||
ArrayAssignmentTarget.typeName = "ArrayAssignmentTarget"; | ||
ArrayAssignmentTarget.typeName = 'ArrayAssignmentTarget'; | ||
ArrayAssignmentTarget.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrayAssignmentTarget" }, | ||
{ name: "elements", type: List(Maybe(Union(AssignmentTargetWithDefault, Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))))) }, | ||
{ name: "rest", type: Maybe(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))) } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'ArrayAssignmentTarget' | ||
}, | ||
{ | ||
name: 'elements', | ||
type: List(Maybe(Union(AssignmentTargetWithDefault, Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))))) | ||
}, | ||
{ | ||
name: 'rest', | ||
type: Maybe(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))) | ||
} | ||
]; | ||
ArrayBinding.typeName = "ArrayBinding"; | ||
ArrayBinding.typeName = 'ArrayBinding'; | ||
ArrayBinding.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrayBinding" }, | ||
{ name: "elements", type: List(Maybe(Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))))) }, | ||
{ name: "rest", type: Maybe(Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ArrayBinding' }, | ||
{ | ||
name: 'elements', | ||
type: List(Maybe(Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))))) | ||
}, | ||
{ | ||
name: 'rest', | ||
type: Maybe(Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) | ||
} | ||
]; | ||
ArrayExpression.typeName = "ArrayExpression"; | ||
ArrayExpression.typeName = 'ArrayExpression'; | ||
ArrayExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrayExpression" }, | ||
{ name: "elements", type: List(Maybe(Union(Expression, SpreadElement))) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ArrayExpression' }, | ||
{ name: 'elements', type: List(Maybe(Union(Expression, SpreadElement))) } | ||
]; | ||
ArrowExpression.typeName = "ArrowExpression"; | ||
ArrowExpression.typeName = 'ArrowExpression'; | ||
ArrowExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrowExpression" }, | ||
{ name: "isAsync", type: BOOLEAN }, | ||
{ name: "params", type: FormalParameters }, | ||
{ name: "body", type: Union(Expression, FunctionBody) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ArrowExpression' }, | ||
{ name: 'isAsync', type: BOOLEAN }, | ||
{ name: 'params', type: FormalParameters }, | ||
{ name: 'body', type: Union(Expression, FunctionBody) } | ||
]; | ||
AssignmentExpression.typeName = "AssignmentExpression"; | ||
AssignmentExpression.typeName = 'AssignmentExpression'; | ||
AssignmentExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentExpression" }, | ||
{ name: "binding", type: Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)) }, | ||
{ name: "expression", type: Expression } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'AssignmentExpression' | ||
}, | ||
{ | ||
name: 'binding', | ||
type: Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)) | ||
}, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
AssignmentTargetIdentifier.typeName = "AssignmentTargetIdentifier"; | ||
AssignmentTargetIdentifier.typeName = 'AssignmentTargetIdentifier'; | ||
AssignmentTargetIdentifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentTargetIdentifier" }, | ||
{ name: "name", type: STRING } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'AssignmentTargetIdentifier' | ||
}, | ||
{ name: 'name', type: STRING } | ||
]; | ||
AssignmentTargetPropertyIdentifier.typeName = "AssignmentTargetPropertyIdentifier"; | ||
AssignmentTargetPropertyIdentifier.typeName = 'AssignmentTargetPropertyIdentifier'; | ||
AssignmentTargetPropertyIdentifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentTargetPropertyIdentifier" }, | ||
{ name: "binding", type: AssignmentTargetIdentifier }, | ||
{ name: "init", type: Maybe(Expression) } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'AssignmentTargetPropertyIdentifier' | ||
}, | ||
{ name: 'binding', type: AssignmentTargetIdentifier }, | ||
{ name: 'init', type: Maybe(Expression) } | ||
]; | ||
AssignmentTargetPropertyProperty.typeName = "AssignmentTargetPropertyProperty"; | ||
AssignmentTargetPropertyProperty.typeName = 'AssignmentTargetPropertyProperty'; | ||
AssignmentTargetPropertyProperty.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentTargetPropertyProperty" }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "binding", type: Union(AssignmentTargetWithDefault, Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))) } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'AssignmentTargetPropertyProperty' | ||
}, | ||
{ name: 'name', type: PropertyName }, | ||
{ | ||
name: 'binding', | ||
type: Union(AssignmentTargetWithDefault, Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))) | ||
} | ||
]; | ||
AssignmentTargetWithDefault.typeName = "AssignmentTargetWithDefault"; | ||
AssignmentTargetWithDefault.typeName = 'AssignmentTargetWithDefault'; | ||
AssignmentTargetWithDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentTargetWithDefault" }, | ||
{ name: "binding", type: Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)) }, | ||
{ name: "init", type: Expression } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'AssignmentTargetWithDefault' | ||
}, | ||
{ | ||
name: 'binding', | ||
type: Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)) | ||
}, | ||
{ name: 'init', type: Expression } | ||
]; | ||
AwaitExpression.typeName = "AwaitExpression"; | ||
AwaitExpression.typeName = 'AwaitExpression'; | ||
AwaitExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AwaitExpression" }, | ||
{ name: "expression", type: Expression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'AwaitExpression' }, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
BinaryExpression.typeName = "BinaryExpression"; | ||
BinaryExpression.typeName = 'BinaryExpression'; | ||
BinaryExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BinaryExpression" }, | ||
{ name: "left", type: Expression }, | ||
{ name: "operator", type: BinaryOperator }, | ||
{ name: "right", type: Expression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'BinaryExpression' }, | ||
{ name: 'left', type: Expression }, | ||
{ name: 'operator', type: BinaryOperator }, | ||
{ name: 'right', type: Expression } | ||
]; | ||
BindingIdentifier.typeName = "BindingIdentifier"; | ||
BindingIdentifier.typeName = 'BindingIdentifier'; | ||
BindingIdentifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BindingIdentifier" }, | ||
{ name: "name", type: STRING } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'BindingIdentifier' }, | ||
{ name: 'name', type: STRING } | ||
]; | ||
BindingPropertyIdentifier.typeName = "BindingPropertyIdentifier"; | ||
BindingPropertyIdentifier.typeName = 'BindingPropertyIdentifier'; | ||
BindingPropertyIdentifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BindingPropertyIdentifier" }, | ||
{ name: "binding", type: BindingIdentifier }, | ||
{ name: "init", type: Maybe(Expression) } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'BindingPropertyIdentifier' | ||
}, | ||
{ name: 'binding', type: BindingIdentifier }, | ||
{ name: 'init', type: Maybe(Expression) } | ||
]; | ||
BindingPropertyProperty.typeName = "BindingPropertyProperty"; | ||
BindingPropertyProperty.typeName = 'BindingPropertyProperty'; | ||
BindingPropertyProperty.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BindingPropertyProperty" }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "binding", type: Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'BindingPropertyProperty' | ||
}, | ||
{ name: 'name', type: PropertyName }, | ||
{ | ||
name: 'binding', | ||
type: Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) | ||
} | ||
]; | ||
BindingWithDefault.typeName = "BindingWithDefault"; | ||
BindingWithDefault.typeName = 'BindingWithDefault'; | ||
BindingWithDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BindingWithDefault" }, | ||
{ name: "binding", type: Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)) }, | ||
{ name: "init", type: Expression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'BindingWithDefault' }, | ||
{ | ||
name: 'binding', | ||
type: Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)) | ||
}, | ||
{ name: 'init', type: Expression } | ||
]; | ||
Block.typeName = "Block"; | ||
Block.typeName = 'Block'; | ||
Block.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Block" }, | ||
{ name: "statements", type: List(Statement) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'Block' }, | ||
{ name: 'statements', type: List(Statement) } | ||
]; | ||
BlockStatement.typeName = "BlockStatement"; | ||
BlockStatement.typeName = 'BlockStatement'; | ||
BlockStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BlockStatement" }, | ||
{ name: "block", type: Block } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'BlockStatement' }, | ||
{ name: 'block', type: Block } | ||
]; | ||
BreakStatement.typeName = "BreakStatement"; | ||
BreakStatement.typeName = 'BreakStatement'; | ||
BreakStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BreakStatement" }, | ||
{ name: "label", type: Maybe(STRING) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'BreakStatement' }, | ||
{ name: 'label', type: Maybe(STRING) } | ||
]; | ||
CallExpression.typeName = "CallExpression"; | ||
CallExpression.typeName = 'CallExpression'; | ||
CallExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "CallExpression" }, | ||
{ name: "callee", type: Union(Expression, Super) }, | ||
{ name: "arguments", type: List(Union(Expression, SpreadElement)) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'CallExpression' }, | ||
{ name: 'callee', type: Union(Expression, Super) }, | ||
{ name: 'arguments', type: List(Union(Expression, SpreadElement)) } | ||
]; | ||
CatchClause.typeName = "CatchClause"; | ||
CatchClause.typeName = 'CatchClause'; | ||
CatchClause.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "CatchClause" }, | ||
{ name: "binding", type: Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)) }, | ||
{ name: "body", type: Block } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'CatchClause' }, | ||
{ | ||
name: 'binding', | ||
type: Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)) | ||
}, | ||
{ name: 'body', type: Block } | ||
]; | ||
ClassDeclaration.typeName = "ClassDeclaration"; | ||
ClassDeclaration.typeName = 'ClassDeclaration'; | ||
ClassDeclaration.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ClassDeclaration" }, | ||
{ name: "name", type: BindingIdentifier }, | ||
{ name: "super", type: Maybe(Expression) }, | ||
{ name: "elements", type: List(ClassElement) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ClassDeclaration' }, | ||
{ name: 'name', type: BindingIdentifier }, | ||
{ name: 'super', type: Maybe(Expression) }, | ||
{ name: 'elements', type: List(ClassElement) } | ||
]; | ||
ClassElement.typeName = "ClassElement"; | ||
ClassElement.typeName = 'ClassElement'; | ||
ClassElement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ClassElement" }, | ||
{ name: "isStatic", type: BOOLEAN }, | ||
{ name: "method", type: MethodDefinition } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ClassElement' }, | ||
{ name: 'isStatic', type: BOOLEAN }, | ||
{ name: 'method', type: MethodDefinition } | ||
]; | ||
ClassExpression.typeName = "ClassExpression"; | ||
ClassExpression.typeName = 'ClassExpression'; | ||
ClassExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ClassExpression" }, | ||
{ name: "name", type: Maybe(BindingIdentifier) }, | ||
{ name: "super", type: Maybe(Expression) }, | ||
{ name: "elements", type: List(ClassElement) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ClassExpression' }, | ||
{ name: 'name', type: Maybe(BindingIdentifier) }, | ||
{ name: 'super', type: Maybe(Expression) }, | ||
{ name: 'elements', type: List(ClassElement) } | ||
]; | ||
CompoundAssignmentExpression.typeName = "CompoundAssignmentExpression"; | ||
CompoundAssignmentExpression.typeName = 'CompoundAssignmentExpression'; | ||
CompoundAssignmentExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "CompoundAssignmentExpression" }, | ||
{ name: "binding", type: Union(AssignmentTargetIdentifier, MemberAssignmentTarget) }, | ||
{ name: "operator", type: CompoundAssignmentOperator }, | ||
{ name: "expression", type: Expression } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'CompoundAssignmentExpression' | ||
}, | ||
{ | ||
name: 'binding', | ||
type: Union(AssignmentTargetIdentifier, MemberAssignmentTarget) | ||
}, | ||
{ name: 'operator', type: CompoundAssignmentOperator }, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
ComputedMemberAssignmentTarget.typeName = "ComputedMemberAssignmentTarget"; | ||
ComputedMemberAssignmentTarget.typeName = 'ComputedMemberAssignmentTarget'; | ||
ComputedMemberAssignmentTarget.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ComputedMemberAssignmentTarget" }, | ||
{ name: "object", type: Union(Expression, Super) }, | ||
{ name: "expression", type: Expression } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'ComputedMemberAssignmentTarget' | ||
}, | ||
{ name: 'object', type: Union(Expression, Super) }, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
ComputedMemberExpression.typeName = "ComputedMemberExpression"; | ||
ComputedMemberExpression.typeName = 'ComputedMemberExpression'; | ||
ComputedMemberExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ComputedMemberExpression" }, | ||
{ name: "object", type: Union(Expression, Super) }, | ||
{ name: "expression", type: Expression } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'ComputedMemberExpression' | ||
}, | ||
{ name: 'object', type: Union(Expression, Super) }, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
ComputedPropertyName.typeName = "ComputedPropertyName"; | ||
ComputedPropertyName.typeName = 'ComputedPropertyName'; | ||
ComputedPropertyName.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ComputedPropertyName" }, | ||
{ name: "expression", type: Expression } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'ComputedPropertyName' | ||
}, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
ConditionalExpression.typeName = "ConditionalExpression"; | ||
ConditionalExpression.typeName = 'ConditionalExpression'; | ||
ConditionalExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ConditionalExpression" }, | ||
{ name: "test", type: Expression }, | ||
{ name: "consequent", type: Expression }, | ||
{ name: "alternate", type: Expression } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'ConditionalExpression' | ||
}, | ||
{ name: 'test', type: Expression }, | ||
{ name: 'consequent', type: Expression }, | ||
{ name: 'alternate', type: Expression } | ||
]; | ||
ContinueStatement.typeName = "ContinueStatement"; | ||
ContinueStatement.typeName = 'ContinueStatement'; | ||
ContinueStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ContinueStatement" }, | ||
{ name: "label", type: Maybe(STRING) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ContinueStatement' }, | ||
{ name: 'label', type: Maybe(STRING) } | ||
]; | ||
DataProperty.typeName = "DataProperty"; | ||
DataProperty.typeName = 'DataProperty'; | ||
DataProperty.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "DataProperty" }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "expression", type: Expression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'DataProperty' }, | ||
{ name: 'name', type: PropertyName }, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
DebuggerStatement.typeName = "DebuggerStatement"; | ||
DebuggerStatement.typeName = 'DebuggerStatement'; | ||
DebuggerStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "DebuggerStatement" } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'DebuggerStatement' } | ||
]; | ||
Directive.typeName = "Directive"; | ||
Directive.typeName = 'Directive'; | ||
Directive.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Directive" }, | ||
{ name: "rawValue", type: STRING } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'Directive' }, | ||
{ name: 'rawValue', type: STRING } | ||
]; | ||
DoWhileStatement.typeName = "DoWhileStatement"; | ||
DoWhileStatement.typeName = 'DoWhileStatement'; | ||
DoWhileStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "DoWhileStatement" }, | ||
{ name: "body", type: Statement }, | ||
{ name: "test", type: Expression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'DoWhileStatement' }, | ||
{ name: 'body', type: Statement }, | ||
{ name: 'test', type: Expression } | ||
]; | ||
EmptyStatement.typeName = "EmptyStatement"; | ||
EmptyStatement.typeName = 'EmptyStatement'; | ||
EmptyStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "EmptyStatement" } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'EmptyStatement' } | ||
]; | ||
Export.typeName = "Export"; | ||
Export.typeName = 'Export'; | ||
Export.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Export" }, | ||
{ name: "declaration", type: Union(ClassDeclaration, FunctionDeclaration, VariableDeclaration) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'Export' }, | ||
{ | ||
name: 'declaration', | ||
type: Union(ClassDeclaration, FunctionDeclaration, VariableDeclaration) | ||
} | ||
]; | ||
ExportAllFrom.typeName = "ExportAllFrom"; | ||
ExportAllFrom.typeName = 'ExportAllFrom'; | ||
ExportAllFrom.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportAllFrom" }, | ||
{ name: "moduleSpecifier", type: STRING } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ExportAllFrom' }, | ||
{ name: 'moduleSpecifier', type: STRING } | ||
]; | ||
ExportDefault.typeName = "ExportDefault"; | ||
ExportDefault.typeName = 'ExportDefault'; | ||
ExportDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportDefault" }, | ||
{ name: "body", type: Union(ClassDeclaration, Expression, FunctionDeclaration) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ExportDefault' }, | ||
{ | ||
name: 'body', | ||
type: Union(ClassDeclaration, Expression, FunctionDeclaration) | ||
} | ||
]; | ||
ExportFrom.typeName = "ExportFrom"; | ||
ExportFrom.typeName = 'ExportFrom'; | ||
ExportFrom.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportFrom" }, | ||
{ name: "namedExports", type: List(ExportFromSpecifier) }, | ||
{ name: "moduleSpecifier", type: STRING } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ExportFrom' }, | ||
{ name: 'namedExports', type: List(ExportFromSpecifier) }, | ||
{ name: 'moduleSpecifier', type: STRING } | ||
]; | ||
ExportFromSpecifier.typeName = "ExportFromSpecifier"; | ||
ExportFromSpecifier.typeName = 'ExportFromSpecifier'; | ||
ExportFromSpecifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportFromSpecifier" }, | ||
{ name: "name", type: STRING }, | ||
{ name: "exportedName", type: Maybe(STRING) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ExportFromSpecifier' }, | ||
{ name: 'name', type: STRING }, | ||
{ name: 'exportedName', type: Maybe(STRING) } | ||
]; | ||
ExportLocalSpecifier.typeName = "ExportLocalSpecifier"; | ||
ExportLocalSpecifier.typeName = 'ExportLocalSpecifier'; | ||
ExportLocalSpecifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportLocalSpecifier" }, | ||
{ name: "name", type: IdentifierExpression }, | ||
{ name: "exportedName", type: Maybe(STRING) } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'ExportLocalSpecifier' | ||
}, | ||
{ name: 'name', type: IdentifierExpression }, | ||
{ name: 'exportedName', type: Maybe(STRING) } | ||
]; | ||
ExportLocals.typeName = "ExportLocals"; | ||
ExportLocals.typeName = 'ExportLocals'; | ||
ExportLocals.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportLocals" }, | ||
{ name: "namedExports", type: List(ExportLocalSpecifier) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ExportLocals' }, | ||
{ name: 'namedExports', type: List(ExportLocalSpecifier) } | ||
]; | ||
ExpressionStatement.typeName = "ExpressionStatement"; | ||
ExpressionStatement.typeName = 'ExpressionStatement'; | ||
ExpressionStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExpressionStatement" }, | ||
{ name: "expression", type: Expression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ExpressionStatement' }, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
ForAwaitStatement.typeName = "ForAwaitStatement"; | ||
ForAwaitStatement.typeName = 'ForAwaitStatement'; | ||
ForAwaitStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ForAwaitStatement" }, | ||
{ name: "left", type: Union(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)), VariableDeclaration) }, | ||
{ name: "right", type: Expression }, | ||
{ name: "body", type: Statement } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ForAwaitStatement' }, | ||
{ | ||
name: 'left', | ||
type: Union(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)), VariableDeclaration) | ||
}, | ||
{ name: 'right', type: Expression }, | ||
{ name: 'body', type: Statement } | ||
]; | ||
ForInStatement.typeName = "ForInStatement"; | ||
ForInStatement.typeName = 'ForInStatement'; | ||
ForInStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ForInStatement" }, | ||
{ name: "left", type: Union(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)), VariableDeclaration) }, | ||
{ name: "right", type: Expression }, | ||
{ name: "body", type: Statement } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ForInStatement' }, | ||
{ | ||
name: 'left', | ||
type: Union(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)), VariableDeclaration) | ||
}, | ||
{ name: 'right', type: Expression }, | ||
{ name: 'body', type: Statement } | ||
]; | ||
ForOfStatement.typeName = "ForOfStatement"; | ||
ForOfStatement.typeName = 'ForOfStatement'; | ||
ForOfStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ForOfStatement" }, | ||
{ name: "left", type: Union(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)), VariableDeclaration) }, | ||
{ name: "right", type: Expression }, | ||
{ name: "body", type: Statement } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ForOfStatement' }, | ||
{ | ||
name: 'left', | ||
type: Union(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)), VariableDeclaration) | ||
}, | ||
{ name: 'right', type: Expression }, | ||
{ name: 'body', type: Statement } | ||
]; | ||
ForStatement.typeName = "ForStatement"; | ||
ForStatement.typeName = 'ForStatement'; | ||
ForStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ForStatement" }, | ||
{ name: "init", type: Maybe(Union(Expression, VariableDeclaration)) }, | ||
{ name: "test", type: Maybe(Expression) }, | ||
{ name: "update", type: Maybe(Expression) }, | ||
{ name: "body", type: Statement } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ForStatement' }, | ||
{ name: 'init', type: Maybe(Union(Expression, VariableDeclaration)) }, | ||
{ name: 'test', type: Maybe(Expression) }, | ||
{ name: 'update', type: Maybe(Expression) }, | ||
{ name: 'body', type: Statement } | ||
]; | ||
FormalParameters.typeName = "FormalParameters"; | ||
FormalParameters.typeName = 'FormalParameters'; | ||
FormalParameters.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FormalParameters" }, | ||
{ name: "items", type: List(Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)))) }, | ||
{ name: "rest", type: Maybe(Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'FormalParameters' }, | ||
{ | ||
name: 'items', | ||
type: List(Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)))) | ||
}, | ||
{ | ||
name: 'rest', | ||
type: Maybe(Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) | ||
} | ||
]; | ||
FunctionBody.typeName = "FunctionBody"; | ||
FunctionBody.typeName = 'FunctionBody'; | ||
FunctionBody.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FunctionBody" }, | ||
{ name: "directives", type: List(Directive) }, | ||
{ name: "statements", type: List(Statement) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'FunctionBody' }, | ||
{ name: 'directives', type: List(Directive) }, | ||
{ name: 'statements', type: List(Statement) } | ||
]; | ||
FunctionDeclaration.typeName = "FunctionDeclaration"; | ||
FunctionDeclaration.typeName = 'FunctionDeclaration'; | ||
FunctionDeclaration.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FunctionDeclaration" }, | ||
{ name: "isAsync", type: BOOLEAN }, | ||
{ name: "isGenerator", type: BOOLEAN }, | ||
{ name: "name", type: BindingIdentifier }, | ||
{ name: "params", type: FormalParameters }, | ||
{ name: "body", type: FunctionBody } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'FunctionDeclaration' }, | ||
{ name: 'isAsync', type: BOOLEAN }, | ||
{ name: 'isGenerator', type: BOOLEAN }, | ||
{ name: 'name', type: BindingIdentifier }, | ||
{ name: 'params', type: FormalParameters }, | ||
{ name: 'body', type: FunctionBody } | ||
]; | ||
FunctionExpression.typeName = "FunctionExpression"; | ||
FunctionExpression.typeName = 'FunctionExpression'; | ||
FunctionExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FunctionExpression" }, | ||
{ name: "isAsync", type: BOOLEAN }, | ||
{ name: "isGenerator", type: BOOLEAN }, | ||
{ name: "name", type: Maybe(BindingIdentifier) }, | ||
{ name: "params", type: FormalParameters }, | ||
{ name: "body", type: FunctionBody } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'FunctionExpression' }, | ||
{ name: 'isAsync', type: BOOLEAN }, | ||
{ name: 'isGenerator', type: BOOLEAN }, | ||
{ name: 'name', type: Maybe(BindingIdentifier) }, | ||
{ name: 'params', type: FormalParameters }, | ||
{ name: 'body', type: FunctionBody } | ||
]; | ||
Getter.typeName = "Getter"; | ||
Getter.typeName = 'Getter'; | ||
Getter.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Getter" }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "body", type: FunctionBody } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'Getter' }, | ||
{ name: 'name', type: PropertyName }, | ||
{ name: 'body', type: FunctionBody } | ||
]; | ||
IdentifierExpression.typeName = "IdentifierExpression"; | ||
IdentifierExpression.typeName = 'IdentifierExpression'; | ||
IdentifierExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "IdentifierExpression" }, | ||
{ name: "name", type: STRING } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'IdentifierExpression' | ||
}, | ||
{ name: 'name', type: STRING } | ||
]; | ||
IfStatement.typeName = "IfStatement"; | ||
IfStatement.typeName = 'IfStatement'; | ||
IfStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "IfStatement" }, | ||
{ name: "test", type: Expression }, | ||
{ name: "consequent", type: Statement }, | ||
{ name: "alternate", type: Maybe(Statement) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'IfStatement' }, | ||
{ name: 'test', type: Expression }, | ||
{ name: 'consequent', type: Statement }, | ||
{ name: 'alternate', type: Maybe(Statement) } | ||
]; | ||
Import.typeName = "Import"; | ||
Import.typeName = 'Import'; | ||
Import.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Import" }, | ||
{ name: "defaultBinding", type: Maybe(BindingIdentifier) }, | ||
{ name: "namedImports", type: List(ImportSpecifier) }, | ||
{ name: "moduleSpecifier", type: STRING } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'Import' }, | ||
{ name: 'defaultBinding', type: Maybe(BindingIdentifier) }, | ||
{ name: 'namedImports', type: List(ImportSpecifier) }, | ||
{ name: 'moduleSpecifier', type: STRING } | ||
]; | ||
ImportNamespace.typeName = "ImportNamespace"; | ||
ImportNamespace.typeName = 'ImportNamespace'; | ||
ImportNamespace.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ImportNamespace" }, | ||
{ name: "defaultBinding", type: Maybe(BindingIdentifier) }, | ||
{ name: "namespaceBinding", type: BindingIdentifier }, | ||
{ name: "moduleSpecifier", type: STRING } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ImportNamespace' }, | ||
{ name: 'defaultBinding', type: Maybe(BindingIdentifier) }, | ||
{ name: 'namespaceBinding', type: BindingIdentifier }, | ||
{ name: 'moduleSpecifier', type: STRING } | ||
]; | ||
ImportSpecifier.typeName = "ImportSpecifier"; | ||
ImportSpecifier.typeName = 'ImportSpecifier'; | ||
ImportSpecifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ImportSpecifier" }, | ||
{ name: "name", type: Maybe(STRING) }, | ||
{ name: "binding", type: BindingIdentifier } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ImportSpecifier' }, | ||
{ name: 'name', type: Maybe(STRING) }, | ||
{ name: 'binding', type: BindingIdentifier } | ||
]; | ||
LabeledStatement.typeName = "LabeledStatement"; | ||
LabeledStatement.typeName = 'LabeledStatement'; | ||
LabeledStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LabeledStatement" }, | ||
{ name: "label", type: STRING }, | ||
{ name: "body", type: Statement } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'LabeledStatement' }, | ||
{ name: 'label', type: STRING }, | ||
{ name: 'body', type: Statement } | ||
]; | ||
LiteralBooleanExpression.typeName = "LiteralBooleanExpression"; | ||
LiteralBooleanExpression.typeName = 'LiteralBooleanExpression'; | ||
LiteralBooleanExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralBooleanExpression" }, | ||
{ name: "value", type: BOOLEAN } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'LiteralBooleanExpression' | ||
}, | ||
{ name: 'value', type: BOOLEAN } | ||
]; | ||
LiteralInfinityExpression.typeName = "LiteralInfinityExpression"; | ||
LiteralInfinityExpression.typeName = 'LiteralInfinityExpression'; | ||
LiteralInfinityExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralInfinityExpression" } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'LiteralInfinityExpression' | ||
} | ||
]; | ||
LiteralNullExpression.typeName = "LiteralNullExpression"; | ||
LiteralNullExpression.typeName = 'LiteralNullExpression'; | ||
LiteralNullExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralNullExpression" } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'LiteralNullExpression' | ||
} | ||
]; | ||
LiteralNumericExpression.typeName = "LiteralNumericExpression"; | ||
LiteralNumericExpression.typeName = 'LiteralNumericExpression'; | ||
LiteralNumericExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralNumericExpression" }, | ||
{ name: "value", type: DOUBLE } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'LiteralNumericExpression' | ||
}, | ||
{ name: 'value', type: DOUBLE } | ||
]; | ||
LiteralRegExpExpression.typeName = "LiteralRegExpExpression"; | ||
LiteralRegExpExpression.typeName = 'LiteralRegExpExpression'; | ||
LiteralRegExpExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralRegExpExpression" }, | ||
{ name: "pattern", type: STRING }, | ||
{ name: "global", type: BOOLEAN }, | ||
{ name: "ignoreCase", type: BOOLEAN }, | ||
{ name: "multiLine", type: BOOLEAN }, | ||
{ name: "dotAll", type: BOOLEAN }, | ||
{ name: "unicode", type: BOOLEAN }, | ||
{ name: "sticky", type: BOOLEAN } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'LiteralRegExpExpression' | ||
}, | ||
{ name: 'pattern', type: STRING }, | ||
{ name: 'global', type: BOOLEAN }, | ||
{ name: 'ignoreCase', type: BOOLEAN }, | ||
{ name: 'multiLine', type: BOOLEAN }, | ||
{ name: 'dotAll', type: BOOLEAN }, | ||
{ name: 'unicode', type: BOOLEAN }, | ||
{ name: 'sticky', type: BOOLEAN } | ||
]; | ||
LiteralStringExpression.typeName = "LiteralStringExpression"; | ||
LiteralStringExpression.typeName = 'LiteralStringExpression'; | ||
LiteralStringExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralStringExpression" }, | ||
{ name: "value", type: STRING } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'LiteralStringExpression' | ||
}, | ||
{ name: 'value', type: STRING } | ||
]; | ||
Method.typeName = "Method"; | ||
Method.typeName = 'Method'; | ||
Method.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Method" }, | ||
{ name: "isAsync", type: BOOLEAN }, | ||
{ name: "isGenerator", type: BOOLEAN }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "params", type: FormalParameters }, | ||
{ name: "body", type: FunctionBody } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'Method' }, | ||
{ name: 'isAsync', type: BOOLEAN }, | ||
{ name: 'isGenerator', type: BOOLEAN }, | ||
{ name: 'name', type: PropertyName }, | ||
{ name: 'params', type: FormalParameters }, | ||
{ name: 'body', type: FunctionBody } | ||
]; | ||
Module.typeName = "Module"; | ||
Module.typeName = 'Module'; | ||
Module.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Module" }, | ||
{ name: "directives", type: List(Directive) }, | ||
{ name: "items", type: List(Union(ExportDeclaration, ImportDeclaration, Statement)) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'Module' }, | ||
{ name: 'directives', type: List(Directive) }, | ||
{ | ||
name: 'items', | ||
type: List(Union(ExportDeclaration, ImportDeclaration, Statement)) | ||
} | ||
]; | ||
NewExpression.typeName = "NewExpression"; | ||
NewExpression.typeName = 'NewExpression'; | ||
NewExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "NewExpression" }, | ||
{ name: "callee", type: Expression }, | ||
{ name: "arguments", type: List(Union(Expression, SpreadElement)) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'NewExpression' }, | ||
{ name: 'callee', type: Expression }, | ||
{ name: 'arguments', type: List(Union(Expression, SpreadElement)) } | ||
]; | ||
NewTargetExpression.typeName = "NewTargetExpression"; | ||
NewTargetExpression.typeName = 'NewTargetExpression'; | ||
NewTargetExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "NewTargetExpression" } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'NewTargetExpression' } | ||
]; | ||
ObjectAssignmentTarget.typeName = "ObjectAssignmentTarget"; | ||
ObjectAssignmentTarget.typeName = 'ObjectAssignmentTarget'; | ||
ObjectAssignmentTarget.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ObjectAssignmentTarget" }, | ||
{ name: "properties", type: List(AssignmentTargetProperty) }, | ||
{ name: "rest", type: Maybe(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))) } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'ObjectAssignmentTarget' | ||
}, | ||
{ name: 'properties', type: List(AssignmentTargetProperty) }, | ||
{ | ||
name: 'rest', | ||
type: Maybe(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))) | ||
} | ||
]; | ||
ObjectBinding.typeName = "ObjectBinding"; | ||
ObjectBinding.typeName = 'ObjectBinding'; | ||
ObjectBinding.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ObjectBinding" }, | ||
{ name: "properties", type: List(BindingProperty) }, | ||
{ name: "rest", type: Maybe(Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ObjectBinding' }, | ||
{ name: 'properties', type: List(BindingProperty) }, | ||
{ | ||
name: 'rest', | ||
type: Maybe(Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) | ||
} | ||
]; | ||
ObjectExpression.typeName = "ObjectExpression"; | ||
ObjectExpression.typeName = 'ObjectExpression'; | ||
ObjectExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ObjectExpression" }, | ||
{ name: "properties", type: List(ObjectProperty) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ObjectExpression' }, | ||
{ name: 'properties', type: List(ObjectProperty) } | ||
]; | ||
ReturnStatement.typeName = "ReturnStatement"; | ||
ReturnStatement.typeName = 'ReturnStatement'; | ||
ReturnStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ReturnStatement" }, | ||
{ name: "expression", type: Maybe(Expression) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ReturnStatement' }, | ||
{ name: 'expression', type: Maybe(Expression) } | ||
]; | ||
Script.typeName = "Script"; | ||
Script.typeName = 'Script'; | ||
Script.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Script" }, | ||
{ name: "directives", type: List(Directive) }, | ||
{ name: "statements", type: List(Statement) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'Script' }, | ||
{ name: 'directives', type: List(Directive) }, | ||
{ name: 'statements', type: List(Statement) } | ||
]; | ||
Setter.typeName = "Setter"; | ||
Setter.typeName = 'Setter'; | ||
Setter.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Setter" }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "param", type: Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) }, | ||
{ name: "body", type: FunctionBody } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'Setter' }, | ||
{ name: 'name', type: PropertyName }, | ||
{ | ||
name: 'param', | ||
type: Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) | ||
}, | ||
{ name: 'body', type: FunctionBody } | ||
]; | ||
ShorthandProperty.typeName = "ShorthandProperty"; | ||
ShorthandProperty.typeName = 'ShorthandProperty'; | ||
ShorthandProperty.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ShorthandProperty" }, | ||
{ name: "name", type: IdentifierExpression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ShorthandProperty' }, | ||
{ name: 'name', type: IdentifierExpression } | ||
]; | ||
SpreadElement.typeName = "SpreadElement"; | ||
SpreadElement.typeName = 'SpreadElement'; | ||
SpreadElement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SpreadElement" }, | ||
{ name: "expression", type: Expression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'SpreadElement' }, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
SpreadProperty.typeName = "SpreadProperty"; | ||
SpreadProperty.typeName = 'SpreadProperty'; | ||
SpreadProperty.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SpreadProperty" }, | ||
{ name: "expression", type: Expression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'SpreadProperty' }, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
StaticMemberAssignmentTarget.typeName = "StaticMemberAssignmentTarget"; | ||
StaticMemberAssignmentTarget.typeName = 'StaticMemberAssignmentTarget'; | ||
StaticMemberAssignmentTarget.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "StaticMemberAssignmentTarget" }, | ||
{ name: "object", type: Union(Expression, Super) }, | ||
{ name: "property", type: STRING } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'StaticMemberAssignmentTarget' | ||
}, | ||
{ name: 'object', type: Union(Expression, Super) }, | ||
{ name: 'property', type: STRING } | ||
]; | ||
StaticMemberExpression.typeName = "StaticMemberExpression"; | ||
StaticMemberExpression.typeName = 'StaticMemberExpression'; | ||
StaticMemberExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "StaticMemberExpression" }, | ||
{ name: "object", type: Union(Expression, Super) }, | ||
{ name: "property", type: STRING } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'StaticMemberExpression' | ||
}, | ||
{ name: 'object', type: Union(Expression, Super) }, | ||
{ name: 'property', type: STRING } | ||
]; | ||
StaticPropertyName.typeName = "StaticPropertyName"; | ||
StaticPropertyName.typeName = 'StaticPropertyName'; | ||
StaticPropertyName.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "StaticPropertyName" }, | ||
{ name: "value", type: STRING } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'StaticPropertyName' }, | ||
{ name: 'value', type: STRING } | ||
]; | ||
Super.typeName = "Super"; | ||
Super.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Super" } | ||
]; | ||
SwitchCase.typeName = "SwitchCase"; | ||
Super.typeName = 'Super'; | ||
Super.fields = [{ name: 'type', type: Const(TYPE_INDICATOR), value: 'Super' }]; | ||
SwitchCase.typeName = 'SwitchCase'; | ||
SwitchCase.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SwitchCase" }, | ||
{ name: "test", type: Expression }, | ||
{ name: "consequent", type: List(Statement) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'SwitchCase' }, | ||
{ name: 'test', type: Expression }, | ||
{ name: 'consequent', type: List(Statement) } | ||
]; | ||
SwitchDefault.typeName = "SwitchDefault"; | ||
SwitchDefault.typeName = 'SwitchDefault'; | ||
SwitchDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SwitchDefault" }, | ||
{ name: "consequent", type: List(Statement) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'SwitchDefault' }, | ||
{ name: 'consequent', type: List(Statement) } | ||
]; | ||
SwitchStatement.typeName = "SwitchStatement"; | ||
SwitchStatement.typeName = 'SwitchStatement'; | ||
SwitchStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SwitchStatement" }, | ||
{ name: "discriminant", type: Expression }, | ||
{ name: "cases", type: List(SwitchCase) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'SwitchStatement' }, | ||
{ name: 'discriminant', type: Expression }, | ||
{ name: 'cases', type: List(SwitchCase) } | ||
]; | ||
SwitchStatementWithDefault.typeName = "SwitchStatementWithDefault"; | ||
SwitchStatementWithDefault.typeName = 'SwitchStatementWithDefault'; | ||
SwitchStatementWithDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SwitchStatementWithDefault" }, | ||
{ name: "discriminant", type: Expression }, | ||
{ name: "preDefaultCases", type: List(SwitchCase) }, | ||
{ name: "defaultCase", type: SwitchDefault }, | ||
{ name: "postDefaultCases", type: List(SwitchCase) } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'SwitchStatementWithDefault' | ||
}, | ||
{ name: 'discriminant', type: Expression }, | ||
{ name: 'preDefaultCases', type: List(SwitchCase) }, | ||
{ name: 'defaultCase', type: SwitchDefault }, | ||
{ name: 'postDefaultCases', type: List(SwitchCase) } | ||
]; | ||
TemplateElement.typeName = "TemplateElement"; | ||
TemplateElement.typeName = 'TemplateElement'; | ||
TemplateElement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "TemplateElement" }, | ||
{ name: "rawValue", type: STRING } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'TemplateElement' }, | ||
{ name: 'rawValue', type: STRING } | ||
]; | ||
TemplateExpression.typeName = "TemplateExpression"; | ||
TemplateExpression.typeName = 'TemplateExpression'; | ||
TemplateExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "TemplateExpression" }, | ||
{ name: "tag", type: Maybe(Expression) }, | ||
{ name: "elements", type: List(Union(Expression, TemplateElement)) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'TemplateExpression' }, | ||
{ name: 'tag', type: Maybe(Expression) }, | ||
{ name: 'elements', type: List(Union(Expression, TemplateElement)) } | ||
]; | ||
ThisExpression.typeName = "ThisExpression"; | ||
ThisExpression.typeName = 'ThisExpression'; | ||
ThisExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ThisExpression" } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ThisExpression' } | ||
]; | ||
ThrowStatement.typeName = "ThrowStatement"; | ||
ThrowStatement.typeName = 'ThrowStatement'; | ||
ThrowStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ThrowStatement" }, | ||
{ name: "expression", type: Expression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'ThrowStatement' }, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
TryCatchStatement.typeName = "TryCatchStatement"; | ||
TryCatchStatement.typeName = 'TryCatchStatement'; | ||
TryCatchStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "TryCatchStatement" }, | ||
{ name: "body", type: Block }, | ||
{ name: "catchClause", type: CatchClause } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'TryCatchStatement' }, | ||
{ name: 'body', type: Block }, | ||
{ name: 'catchClause', type: CatchClause } | ||
]; | ||
TryFinallyStatement.typeName = "TryFinallyStatement"; | ||
TryFinallyStatement.typeName = 'TryFinallyStatement'; | ||
TryFinallyStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "TryFinallyStatement" }, | ||
{ name: "body", type: Block }, | ||
{ name: "catchClause", type: Maybe(CatchClause) }, | ||
{ name: "finalizer", type: Block } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'TryFinallyStatement' }, | ||
{ name: 'body', type: Block }, | ||
{ name: 'catchClause', type: Maybe(CatchClause) }, | ||
{ name: 'finalizer', type: Block } | ||
]; | ||
UnaryExpression.typeName = "UnaryExpression"; | ||
UnaryExpression.typeName = 'UnaryExpression'; | ||
UnaryExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "UnaryExpression" }, | ||
{ name: "operator", type: UnaryOperator }, | ||
{ name: "operand", type: Expression } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'UnaryExpression' }, | ||
{ name: 'operator', type: UnaryOperator }, | ||
{ name: 'operand', type: Expression } | ||
]; | ||
UpdateExpression.typeName = "UpdateExpression"; | ||
UpdateExpression.typeName = 'UpdateExpression'; | ||
UpdateExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "UpdateExpression" }, | ||
{ name: "isPrefix", type: BOOLEAN }, | ||
{ name: "operator", type: UpdateOperator }, | ||
{ name: "operand", type: Union(AssignmentTargetIdentifier, MemberAssignmentTarget) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'UpdateExpression' }, | ||
{ name: 'isPrefix', type: BOOLEAN }, | ||
{ name: 'operator', type: UpdateOperator }, | ||
{ | ||
name: 'operand', | ||
type: Union(AssignmentTargetIdentifier, MemberAssignmentTarget) | ||
} | ||
]; | ||
VariableDeclaration.typeName = "VariableDeclaration"; | ||
VariableDeclaration.typeName = 'VariableDeclaration'; | ||
VariableDeclaration.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "VariableDeclaration" }, | ||
{ name: "kind", type: VariableDeclarationKind }, | ||
{ name: "declarators", type: List(VariableDeclarator) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'VariableDeclaration' }, | ||
{ name: 'kind', type: VariableDeclarationKind }, | ||
{ name: 'declarators', type: List(VariableDeclarator) } | ||
]; | ||
VariableDeclarationStatement.typeName = "VariableDeclarationStatement"; | ||
VariableDeclarationStatement.typeName = 'VariableDeclarationStatement'; | ||
VariableDeclarationStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "VariableDeclarationStatement" }, | ||
{ name: "declaration", type: VariableDeclaration } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'VariableDeclarationStatement' | ||
}, | ||
{ name: 'declaration', type: VariableDeclaration } | ||
]; | ||
VariableDeclarator.typeName = "VariableDeclarator"; | ||
VariableDeclarator.typeName = 'VariableDeclarator'; | ||
VariableDeclarator.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "VariableDeclarator" }, | ||
{ name: "binding", type: Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)) }, | ||
{ name: "init", type: Maybe(Expression) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'VariableDeclarator' }, | ||
{ | ||
name: 'binding', | ||
type: Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)) | ||
}, | ||
{ name: 'init', type: Maybe(Expression) } | ||
]; | ||
WhileStatement.typeName = "WhileStatement"; | ||
WhileStatement.typeName = 'WhileStatement'; | ||
WhileStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "WhileStatement" }, | ||
{ name: "test", type: Expression }, | ||
{ name: "body", type: Statement } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'WhileStatement' }, | ||
{ name: 'test', type: Expression }, | ||
{ name: 'body', type: Statement } | ||
]; | ||
WithStatement.typeName = "WithStatement"; | ||
WithStatement.typeName = 'WithStatement'; | ||
WithStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "WithStatement" }, | ||
{ name: "object", type: Expression }, | ||
{ name: "body", type: Statement } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'WithStatement' }, | ||
{ name: 'object', type: Expression }, | ||
{ name: 'body', type: Statement } | ||
]; | ||
YieldExpression.typeName = "YieldExpression"; | ||
YieldExpression.typeName = 'YieldExpression'; | ||
YieldExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "YieldExpression" }, | ||
{ name: "expression", type: Maybe(Expression) } | ||
{ name: 'type', type: Const(TYPE_INDICATOR), value: 'YieldExpression' }, | ||
{ name: 'expression', type: Maybe(Expression) } | ||
]; | ||
YieldGeneratorExpression.typeName = "YieldGeneratorExpression"; | ||
YieldGeneratorExpression.typeName = 'YieldGeneratorExpression'; | ||
YieldGeneratorExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "YieldGeneratorExpression" }, | ||
{ name: "expression", type: Expression } | ||
{ | ||
name: 'type', | ||
type: Const(TYPE_INDICATOR), | ||
value: 'YieldGeneratorExpression' | ||
}, | ||
{ name: 'expression', type: Expression } | ||
]; | ||
return SPEC; | ||
}()); | ||
})(); |
@@ -15,3 +15,3 @@ "use strict"; | ||
Object.keys(environment.Syntax) | ||
.filter(key => key !== "Property") | ||
.filter(key => key !== 'Property') | ||
.forEach(key => { | ||
@@ -18,0 +18,0 @@ delete environment.Syntax[key]; |
@@ -72,3 +72,3 @@ "use strict"; | ||
if (config.verbose) { | ||
console.log(`[${(new Date()).toISOString()}]: Executing ${modification.constructor.name}`); | ||
console.log(`[${new Date().toISOString()}]: Executing ${modification.constructor.name}`); | ||
} | ||
@@ -75,0 +75,0 @@ modification.execute(); |
@@ -1,2 +0,2 @@ | ||
import Modification from "../../modification"; | ||
import Modification from '../../modification'; | ||
import * as Shift from 'shift-ast'; | ||
@@ -3,0 +3,0 @@ export default class ArrayUnpacker extends Modification { |
@@ -115,5 +115,7 @@ "use strict"; | ||
isLiteralArrayDeclaration(node) { | ||
return node.type == 'VariableDeclarator' && node.binding.type == 'BindingIdentifier' | ||
&& node.init != null && node.init.type == 'ArrayExpression' | ||
&& node.init.elements.find(e => e && !e.type.startsWith('Literal')) == undefined; | ||
return (node.type == 'VariableDeclarator' && | ||
node.binding.type == 'BindingIdentifier' && | ||
node.init != null && | ||
node.init.type == 'ArrayExpression' && | ||
node.init.elements.find(e => e && !e.type.startsWith('Literal')) == undefined); | ||
} | ||
@@ -125,6 +127,7 @@ /** | ||
isSimpleArrayAccess(node) { | ||
return node.type == 'ComputedMemberExpression' && node.object.type == 'IdentifierExpression' | ||
&& node.expression.type == 'LiteralNumericExpression'; | ||
return (node.type == 'ComputedMemberExpression' && | ||
node.object.type == 'IdentifierExpression' && | ||
node.expression.type == 'LiteralNumericExpression'); | ||
} | ||
} | ||
exports.default = ArrayUnpacker; |
@@ -26,5 +26,3 @@ "use strict"; | ||
} | ||
return this.parent | ||
? this.parent.findArray(name) | ||
: null; | ||
return this.parent ? this.parent.findArray(name) : null; | ||
} | ||
@@ -31,0 +29,0 @@ /** |
@@ -57,5 +57,3 @@ "use strict"; | ||
} | ||
return node.type == 'BlockStatement' | ||
? node.block.statements | ||
: node; | ||
return node.type == 'BlockStatement' ? node.block.statements : node; | ||
} | ||
@@ -62,0 +60,0 @@ /** |
import * as Shift from 'shift-ast'; | ||
export default class ExecutedFunction { | ||
func: FunctionType; | ||
parent: Shift.Node; | ||
name?: string; | ||
failedReplacement: boolean; | ||
private id; | ||
@@ -9,6 +11,7 @@ private didError; | ||
* Creates a new executed function. | ||
* @param body The body of the function. | ||
* @param func The function node. | ||
* @param parent The parent node. | ||
* @param name The name of the function (optional). | ||
*/ | ||
constructor(func: FunctionType, name?: string); | ||
constructor(func: FunctionType, parent: Shift.Node, name?: string); | ||
/** | ||
@@ -26,2 +29,6 @@ * Attempts to evaluate the function. | ||
/** | ||
* Removes the executed function. | ||
*/ | ||
remove(): void; | ||
/** | ||
* Replaces references to the function itself within a given node. | ||
@@ -28,0 +35,0 @@ * @param node The AST node. |
@@ -21,2 +21,5 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -27,11 +30,15 @@ const Shift = __importStar(require("shift-ast")); | ||
const shift_codegen_1 = require("shift-codegen"); | ||
const traversalHelper_1 = __importDefault(require("../../helpers/traversalHelper")); | ||
class ExecutedFunction { | ||
/** | ||
* Creates a new executed function. | ||
* @param body The body of the function. | ||
* @param func The function node. | ||
* @param parent The parent node. | ||
* @param name The name of the function (optional). | ||
*/ | ||
constructor(func, name) { | ||
constructor(func, parent, name) { | ||
this.func = func; | ||
this.parent = parent; | ||
this.name = name; | ||
this.failedReplacement = false; | ||
this.id = uuid_1.v4().replace(/-/g, '_'); | ||
@@ -101,2 +108,10 @@ this.didError = false; | ||
/** | ||
* Removes the executed function. | ||
*/ | ||
remove() { | ||
if (!this.failedReplacement && !this.didError) { | ||
traversalHelper_1.default.removeNode(this.parent, this.func); | ||
} | ||
} | ||
/** | ||
* Replaces references to the function itself within a given node. | ||
@@ -112,3 +127,4 @@ * @param node The AST node. | ||
enter(node, parent) { | ||
if ((node.type == 'IdentifierExpression' || node.type == 'AssignmentTargetIdentifier') && node.name == self.name) { | ||
if ((node.type == 'IdentifierExpression' || node.type == 'AssignmentTargetIdentifier') && | ||
node.name == self.name) { | ||
node.name = `EXECUTED_FUNCTION_${self.id}`; | ||
@@ -115,0 +131,0 @@ } |
@@ -6,2 +6,3 @@ import * as Shift from 'shift-ast'; | ||
private readonly functionTypes; | ||
private executedFunctions; | ||
private globalScope; | ||
@@ -31,2 +32,6 @@ private foundExecutedFunction; | ||
/** | ||
* Attempts to remove all executed functions. | ||
*/ | ||
private removeFunctions; | ||
/** | ||
* Attempts to convert a literal value to an AST node. | ||
@@ -33,0 +38,0 @@ * @param value The literal value. |
@@ -40,2 +40,3 @@ "use strict"; | ||
this.functionTypes = new Set(['FunctionDeclaration', 'FunctionExpression', 'ArrowExpression']); | ||
this.executedFunctions = []; | ||
this.globalScope = new scope_1.default(ast); | ||
@@ -53,2 +54,3 @@ this.foundExecutedFunction = false; | ||
} | ||
this.removeFunctions(); | ||
} | ||
@@ -76,5 +78,5 @@ /** | ||
} | ||
const executedFunction = new executedFunction_1.default(node, name); | ||
const executedFunction = new executedFunction_1.default(node, parent, name); | ||
scope.addExecutedFunction(executedFunction); | ||
traversalHelper_1.default.removeNode(parent, node); | ||
self.executedFunctions.push(executedFunction); | ||
if (!self.foundExecutedFunction) { | ||
@@ -143,2 +145,5 @@ self.foundExecutedFunction = true; | ||
} | ||
else { | ||
executedFunction.failedReplacement = true; | ||
} | ||
} | ||
@@ -155,2 +160,10 @@ } | ||
/** | ||
* Attempts to remove all executed functions. | ||
*/ | ||
removeFunctions() { | ||
for (const func of this.executedFunctions) { | ||
func.remove(); | ||
} | ||
} | ||
/** | ||
* Attempts to convert a literal value to an AST node. | ||
@@ -174,2 +187,23 @@ * @param value The literal value. | ||
}); | ||
case 'object': { | ||
if (value == null) { | ||
return new Shift.LiteralNullExpression(); | ||
} | ||
else if (Array.isArray(value)) { | ||
const elements = []; | ||
for (let i = 0; i < value.length; i++) { | ||
const element = this.literalValueToNode(value[i]); | ||
if (element == null) { | ||
return null; | ||
} | ||
elements.push(element); | ||
} | ||
return new Shift.ArrayExpression({ | ||
elements | ||
}); | ||
} | ||
else { | ||
return null; | ||
} | ||
} | ||
default: | ||
@@ -185,6 +219,8 @@ return null; | ||
isVariableReassignment(node) { | ||
return node.type == 'VariableDeclarator' && node.binding.type == 'BindingIdentifier' | ||
&& node.init != null && node.init.type == 'IdentifierExpression'; | ||
return (node.type == 'VariableDeclarator' && | ||
node.binding.type == 'BindingIdentifier' && | ||
node.init != null && | ||
node.init.type == 'IdentifierExpression'); | ||
} | ||
} | ||
exports.default = FunctionExecutor; |
@@ -26,5 +26,3 @@ "use strict"; | ||
} | ||
return this.parent | ||
? this.parent.findExecutedFunction(name) | ||
: null; | ||
return this.parent ? this.parent.findExecutedFunction(name) : null; | ||
} | ||
@@ -31,0 +29,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import Modification from "../../modification"; | ||
import Modification from '../../modification'; | ||
import * as Shift from 'shift-ast'; | ||
@@ -3,0 +3,0 @@ export default class ExpressionSimplifier extends Modification { |
@@ -86,5 +86,3 @@ "use strict"; | ||
const simplified = this.evalCodeToExpression(code); | ||
return simplified != null | ||
? simplified | ||
: expression; | ||
return simplified != null ? simplified : expression; | ||
} | ||
@@ -104,5 +102,3 @@ else { | ||
const simplified = this.evalCodeToExpression(code); | ||
return simplified != null | ||
? simplified | ||
: expression; | ||
return simplified != null ? simplified : expression; | ||
} | ||
@@ -157,5 +153,3 @@ else { | ||
const operand = this.getExpressionValueAsString(expression.operand); | ||
return operand != null | ||
? expression.operator + operand | ||
: null; | ||
return operand != null ? `${expression.operator} ${operand}` : null; | ||
default: | ||
@@ -162,0 +156,0 @@ return null; |
@@ -1,2 +0,2 @@ | ||
import Modification from "../../modification"; | ||
import Modification from '../../modification'; | ||
import * as Shift from 'shift-ast'; | ||
@@ -3,0 +3,0 @@ export default class PropertySimplifier extends Modification { |
@@ -71,6 +71,8 @@ "use strict"; | ||
isStringComputedMember(node) { | ||
return node.object && /.*Expression/.test(node.object.type) | ||
&& node.expression != null && node.expression.type == 'LiteralStringExpression'; | ||
return (node.object && | ||
/.*Expression/.test(node.object.type) && | ||
node.expression != null && | ||
node.expression.type == 'LiteralStringExpression'); | ||
} | ||
} | ||
exports.default = PropertySimplifier; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -6,2 +25,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Shift = __importStar(require("shift-ast")); | ||
const shift_parser_1 = __importDefault(require("shift-parser")); | ||
@@ -63,3 +83,4 @@ const shift_codegen_1 = require("shift-codegen"); | ||
enter(node, parent) { | ||
if (node.type == 'IdentifierExpression' || node.type == 'AssignmentTargetIdentifier') { | ||
if (node.type == 'IdentifierExpression' || | ||
node.type == 'AssignmentTargetIdentifier') { | ||
const name = node.name; | ||
@@ -89,5 +110,14 @@ const index = params.indexOf(name); | ||
duplicateExpression(expression) { | ||
const code = shift_codegen_1.codeGen(expression); | ||
const blockStatement = new Shift.BlockStatement({ | ||
block: new Shift.Block({ | ||
statements: [ | ||
new Shift.ExpressionStatement({ | ||
expression | ||
}) | ||
] | ||
}) | ||
}); | ||
const code = shift_codegen_1.codeGen(blockStatement); | ||
const ast = shift_parser_1.default(code); | ||
return ast.statements[0].expression; | ||
return ast.statements[0].block.statements[0].expression; | ||
} | ||
@@ -94,0 +124,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import Modification from "../../modification"; | ||
import Modification from '../../modification'; | ||
import * as Shift from 'shift-ast'; | ||
@@ -3,0 +3,0 @@ export default class ProxyRemover extends Modification { |
@@ -23,3 +23,9 @@ "use strict"; | ||
this.scopeTypes = new Set(['Block', 'FunctionBody']); | ||
this.proxyExpressionTypes = new Set(['CallExpression', 'BinaryExpression', 'UnaryExpression', 'ComputedMemberExpression', 'IdentifierExpression']); | ||
this.proxyExpressionTypes = new Set([ | ||
'CallExpression', | ||
'BinaryExpression', | ||
'UnaryExpression', | ||
'ComputedMemberExpression', | ||
'IdentifierExpression' | ||
]); | ||
this.shouldRemoveProxyFunctions = removeProxyFunctions; | ||
@@ -172,3 +178,4 @@ this.globalScope = new scope_1.default(this.ast); | ||
const target = edge.target; | ||
if (branch.has(target)) { // cycle found | ||
if (branch.has(target)) { | ||
// cycle found | ||
this.cyclicProxyFunctionIds.add(target.id); | ||
@@ -208,3 +215,3 @@ for (const node of branch) { | ||
let replacement = proxyFunction.getReplacement(args); | ||
replacement = self.replaceProxyFunctionUsages(replacement, scope); | ||
replacement = self.replaceProxyFunctionUsages(replacement, proxyFunction.scope); | ||
if (parent) { | ||
@@ -247,6 +254,9 @@ traversalHelper_1.default.replaceNode(parent, node, replacement); | ||
isProxyFunctionDeclaration(node) { | ||
if (node.type == 'FunctionDeclaration' && node.body.statements.length == 1 | ||
&& node.body.statements[0].type == 'ReturnStatement' && node.body.statements[0].expression != null | ||
&& (this.proxyExpressionTypes.has(node.body.statements[0].expression.type) || node.body.statements[0].expression.type.startsWith('Literal')) | ||
&& node.params.items.find(p => p.type != 'BindingIdentifier') == undefined) { | ||
if (node.type == 'FunctionDeclaration' && | ||
node.body.statements.length == 1 && | ||
node.body.statements[0].type == 'ReturnStatement' && | ||
node.body.statements[0].expression != null && | ||
(this.proxyExpressionTypes.has(node.body.statements[0].expression.type) || | ||
node.body.statements[0].expression.type.startsWith('Literal')) && | ||
node.params.items.find(p => p.type != 'BindingIdentifier') == undefined) { | ||
const self = this; | ||
@@ -273,7 +283,11 @@ let hasScopeNode = false; | ||
isProxyFunctionExpressionDeclaration(node) { | ||
if (node.type == 'VariableDeclarator' && node.binding.type == 'BindingIdentifier' | ||
&& node.init != null && node.init.type == 'FunctionExpression' | ||
&& node.init.body.statements.length == 1 && node.init.body.statements[0].type == 'ReturnStatement' | ||
&& node.init.body.statements[0].expression != null | ||
&& (this.proxyExpressionTypes.has(node.init.body.statements[0].expression.type) || node.init.body.statements[0].expression.type.startsWith('Literal'))) { | ||
if (node.type == 'VariableDeclarator' && | ||
node.binding.type == 'BindingIdentifier' && | ||
node.init != null && | ||
node.init.type == 'FunctionExpression' && | ||
node.init.body.statements.length == 1 && | ||
node.init.body.statements[0].type == 'ReturnStatement' && | ||
node.init.body.statements[0].expression != null && | ||
(this.proxyExpressionTypes.has(node.init.body.statements[0].expression.type) || | ||
node.init.body.statements[0].expression.type.startsWith('Literal'))) { | ||
const self = this; | ||
@@ -300,4 +314,6 @@ let hasScopeNode = false; | ||
isVariableReassignment(node) { | ||
return node.type == 'VariableDeclarator' && node.binding.type == 'BindingIdentifier' | ||
&& node.init != null && node.init.type == 'IdentifierExpression'; | ||
return (node.type == 'VariableDeclarator' && | ||
node.binding.type == 'BindingIdentifier' && | ||
node.init != null && | ||
node.init.type == 'IdentifierExpression'); | ||
} | ||
@@ -304,0 +320,0 @@ /** |
@@ -26,5 +26,3 @@ "use strict"; | ||
} | ||
return this.parent | ||
? this.parent.findProxyFunction(name) | ||
: null; | ||
return this.parent ? this.parent.findProxyFunction(name) : null; | ||
} | ||
@@ -31,0 +29,0 @@ /** |
@@ -30,5 +30,3 @@ "use strict"; | ||
} | ||
return this.parent | ||
? this.parent.lookupVariable(name) | ||
: null; | ||
return this.parent ? this.parent.lookupVariable(name) : null; | ||
} | ||
@@ -35,0 +33,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import Modification from "../../modification"; | ||
import Modification from '../../modification'; | ||
import * as Shift from 'shift-ast'; | ||
@@ -3,0 +3,0 @@ export default class VariableRenamer extends Modification { |
@@ -21,5 +21,3 @@ "use strict"; | ||
this.variableNames = []; | ||
this.usedVariableNames = new Set([ | ||
'if', 'do', 'in', 'var', 'let', 'try', 'for' | ||
]); | ||
this.usedVariableNames = new Set(['if', 'do', 'in', 'var', 'let', 'try', 'for']); | ||
this.nameMapping = new nameMapping_1.default(); | ||
@@ -26,0 +24,0 @@ } |
@@ -0,1 +1,2 @@ | ||
#!/usr/bin/env node | ||
export {}; |
@@ -0,1 +1,2 @@ | ||
#!/usr/bin/env node | ||
"use strict"; | ||
@@ -8,3 +9,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
const fs_1 = __importDefault(require("fs")); | ||
const source = fs_1.default.readFileSync('input/source.js').toString(); | ||
const commander_1 = require("commander"); | ||
const program = new commander_1.Command(); | ||
program | ||
.description('Deobfuscate a javascript file') | ||
.option('-i, --input [input_file]', 'The input file to deobfuscate', 'input/source.js') | ||
.option('-o, --output [output_file]', 'The deobfuscated output file', 'output/output.js'); | ||
program.parse(process.argv); | ||
const options = program.opts(); | ||
// check if the input file exists | ||
if (!fs_1.default.existsSync(options.input)) { | ||
console.error(`The input file ${options.input} does not exist`); | ||
process.exit(1); | ||
} | ||
const source = fs_1.default.readFileSync(options.input).toString(); | ||
const config = { | ||
@@ -31,2 +45,3 @@ verbose: true, | ||
const output = index_1.deobfuscate(source, config); | ||
fs_1.default.writeFileSync('output/output.js', output); | ||
fs_1.default.writeFileSync(options.output, output); | ||
console.info(`The output file ${options.output} has been created`); |
{ | ||
"name": "js-deobfuscator", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"description": "", | ||
"main": "dist/index.js", | ||
"bin": "dist/cli.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"start": "tsc && node dist/run.js", | ||
"prepare": "tsc" | ||
"prepare": "tsc", | ||
"pretty": "npx prettier --write ." | ||
}, | ||
@@ -14,2 +16,3 @@ "author": "", | ||
"dependencies": { | ||
"commander": "^9.4.0", | ||
"estraverse": "^4.2.0", | ||
@@ -16,0 +19,0 @@ "shift-ast": "^6.1.0", |
112
README.md
@@ -10,17 +10,24 @@ # General purpose JavaScript deobfuscator | ||
Looking for a deobfuscator specific to Obfuscator.io/javascript-obfuscator? Try [this repo](https://github.com/ben-sb/deobfuscator-io) | ||
If you would like to discuss/learn about JavaScript obfuscation and deobfuscation you can join the [Discord server](https://discord.com/invite/KQjZx2X28n) | ||
## Features | ||
* Unpacks arrays containing literals (strings, numbers etc) and replaces all references to them | ||
* Removes simple proxy functions (calls to another function), array proxy functions and arithmetic proxy functions (binary expressions) | ||
* Simplifies arithmetic expressions | ||
* Simplifies string concatenation | ||
* Renames unreadable hexadecimal identifiers (e.g. _0xca830a) | ||
* Converts computed to static member expressions and beautifies the code | ||
* *Experimental* function evaluation | ||
- Unpacks arrays containing literals (strings, numbers etc) and replaces all references to them | ||
- Removes simple proxy functions (calls to another function), array proxy functions and arithmetic proxy functions (binary expressions) | ||
- Simplifies arithmetic expressions | ||
- Simplifies string concatenation | ||
- Renames unreadable hexadecimal identifiers (e.g. \_0xca830a) | ||
- Converts computed to static member expressions and beautifies the code | ||
- _Experimental_ function evaluation | ||
## Examples | ||
See bottom for more complicated example with features chained together. | ||
### Array Unpacking | ||
Before | ||
```javascript | ||
@@ -33,4 +40,5 @@ const a = ['\x20', '\x57\x6f\x72\x6c\x64', '\x48\x65\x6c\x6c\x6f']; | ||
After | ||
```javascript | ||
console.log("Hello" + " " + "World"); | ||
console.log('Hello' + ' ' + 'World'); | ||
``` | ||
@@ -41,5 +49,7 @@ | ||
### Proxy Functions | ||
#### An example with simple proxy functions for other functions | ||
Before | ||
```javascript | ||
@@ -54,2 +64,3 @@ function a(b, c) { | ||
After | ||
```javascript | ||
@@ -64,2 +75,3 @@ const result = someFunction(5, 6); | ||
Before | ||
```javascript | ||
@@ -74,2 +86,3 @@ function a(b, c) { | ||
After | ||
```javascript | ||
@@ -84,2 +97,3 @@ const result = 6 + 2 * 5; | ||
Before | ||
```javascript | ||
@@ -100,2 +114,3 @@ function a(b, c) { | ||
After | ||
```javascript | ||
@@ -108,5 +123,7 @@ const result = 6 + 2 * 5; | ||
### Expression Simplification | ||
#### An example with numbers | ||
Before | ||
```javascript | ||
@@ -120,2 +137,3 @@ let total = 0x2 * 0x109e + -0xc * -0x16a + -0x3234; | ||
After | ||
```javascript | ||
@@ -127,2 +145,3 @@ let total = 0; | ||
``` | ||
<br/> | ||
@@ -133,2 +152,3 @@ | ||
Before | ||
```javascript | ||
@@ -139,4 +159,5 @@ console.log('He' + 'll' + 'o' + ' Wo' + 'r' + 'ld'); | ||
After | ||
```javascript | ||
console.log("Hello World"); | ||
console.log('Hello World'); | ||
``` | ||
@@ -147,14 +168,26 @@ | ||
### Overall Example | ||
All these features can be chained together to simplify code. | ||
Before | ||
```javascript | ||
const ar = ['\x48\x65\x6c\x6c\x6f', 0x95, '\x20', 0x1a75, '\x57\x6f\x72\x6c\x64', -0x53, '\x6c\x6f\x67'] | ||
const a = function(b, c) { | ||
return c + 2 * b; | ||
}, b = function(c, d) { | ||
return a(c, d); | ||
}, c = function(d, e) { | ||
return b(d, e); | ||
}; | ||
const ar = [ | ||
'\x48\x65\x6c\x6c\x6f', | ||
0x95, | ||
'\x20', | ||
0x1a75, | ||
'\x57\x6f\x72\x6c\x64', | ||
-0x53, | ||
'\x6c\x6f\x67' | ||
]; | ||
const a = function (b, c) { | ||
return c + 2 * b; | ||
}, | ||
b = function (c, d) { | ||
return a(c, d); | ||
}, | ||
c = function (d, e) { | ||
return b(d, e); | ||
}; | ||
const message = ar[0] + ar[2] + ar[4]; | ||
@@ -166,13 +199,13 @@ const result = c(ar[1] * 0x38 + ar[3] + 0x619, 0x12 * ar[5] + 0x1a13 + 0x621); | ||
After | ||
```javascript | ||
const message = "Hello World"; | ||
const message = 'Hello World'; | ||
const result = 40106; | ||
console.log(message + " " + result); | ||
console.log(message + ' ' + result); | ||
``` | ||
## Advanced Usage | ||
### Function Evaluation | ||
Often obfuscated scripts don't just use an array of strings, instead they have string decoder functions that execute more complex logic, such as the example below. | ||
@@ -196,3 +229,3 @@ | ||
function _0x29e92(_0x337a9) { | ||
"#execute"; | ||
'#execute'; | ||
const _0x38a2db = ['\x48\x65\x6c\x6c\x6f', '\x20', '\x57\x6f\x72\x6c\x64']; | ||
@@ -211,3 +244,3 @@ const _0x9ca21 = _0x337a9 - 0x1; | ||
```javascript | ||
const a = "Hello World"; | ||
const a = 'Hello World'; | ||
console.log(a); | ||
@@ -217,10 +250,11 @@ ``` | ||
A few important points about function evaluation: | ||
* BE CAREFUL when using function evaluation, this executes whatever functions you specify on your local machine so make sure those functions are not doing anything malicious. | ||
* This feature is still somewhat experimental, it's probably easier to use via the CLI as it's easier to find errors than the online version. | ||
* If the function is not a function declaration (i.e. a function expression or an arrow function expression) then the deobfuscator will not be able to detect the name of it automatically. To provide it use "#execute[name=FUNC_NAME]" directive. | ||
* You may need to modify the function to ensure it relies on no external variables (i.e. move a string array declaration inside the function) and handle any extra logic like string array rotation first. | ||
* You must first remove any anti tampering mechanisms before using function evaluation, otherwise it may cause an infinite loop. | ||
- BE CAREFUL when using function evaluation, this executes whatever functions you specify on your local machine so make sure those functions are not doing anything malicious. | ||
- This feature is still somewhat experimental, it's probably easier to use via the CLI as it's easier to find errors than the online version. | ||
- If the function is not a function declaration (i.e. a function expression or an arrow function expression) then the deobfuscator will not be able to detect the name of it automatically. To provide it use "#execute[name=FUNC_NAME]" directive. | ||
- You may need to modify the function to ensure it relies on no external variables (i.e. move a string array declaration inside the function) and handle any extra logic like string array rotation first. | ||
- You must first remove any anti tampering mechanisms before using function evaluation, otherwise it may cause an infinite loop. | ||
## Config | ||
```typescript | ||
@@ -249,6 +283,20 @@ interface Config { | ||
## To Run | ||
Put the obfuscated script in input/source.js and run:<br/> | ||
**npm start** | ||
<br/> | ||
Or use the online version at [deobfuscate.io](https://deobfuscate.io) | ||
Either install the module locally via `npm install js-deobfuscator` and import as usual or install globally `npm install -g js-deobfuscator` and use the `js-deobfuscator` CLI: | ||
```shell | ||
> js-deobfuscator -h | ||
Usage: run [options] | ||
Deobfuscate a javascript file | ||
Options: | ||
-i, --input [input_file] The input file to deobfuscate (default: "input/source.js") | ||
-o, --output [output_file] The deobfuscated output file (default: "output/output.js") | ||
-f, --force Whether to overwrite the output file or not | ||
-h, --help display help for command | ||
> | ||
``` | ||
Alternatively use the online version at [deobfuscate.io](https://deobfuscate.io) |
{ | ||
"include": ["src/**/*"], | ||
"exclude": ["node_modules"], | ||
"compilerOptions": { | ||
/* Visit https://aka.ms/tsconfig.json to read more about this file */ | ||
"include": ["src/**/*"], | ||
"exclude": ["node_modules"], | ||
"compilerOptions": { | ||
/* Visit https://aka.ms/tsconfig.json to read more about this file */ | ||
/* Basic Options */ | ||
// "incremental": true, /* Enable incremental compilation */ | ||
"target": "es2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ | ||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ | ||
// "lib": [], /* Specify library files to be included in the compilation. */ | ||
"allowJs": true, /* Allow javascript files to be compiled. */ | ||
// "checkJs": true, /* Report errors in .js files. */ | ||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ | ||
"declaration": true, /* Generates corresponding '.d.ts' file. */ | ||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ | ||
// "sourceMap": true, /* Generates corresponding '.map' file. */ | ||
// "outFile": "./", /* Concatenate and emit output to single file. */ | ||
"outDir": "./dist", /* Redirect output structure to the directory. */ | ||
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ | ||
// "composite": true, /* Enable project compilation */ | ||
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ | ||
// "removeComments": true, /* Do not emit comments to output. */ | ||
// "noEmit": true, /* Do not emit outputs. */ | ||
// "importHelpers": true, /* Import emit helpers from 'tslib'. */ | ||
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ | ||
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ | ||
/* Basic Options */ | ||
// "incremental": true, /* Enable incremental compilation */ | ||
"target": "es2019" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, | ||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, | ||
// "lib": [], /* Specify library files to be included in the compilation. */ | ||
"allowJs": true /* Allow javascript files to be compiled. */, | ||
// "checkJs": true, /* Report errors in .js files. */ | ||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ | ||
"declaration": true /* Generates corresponding '.d.ts' file. */, | ||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ | ||
// "sourceMap": true, /* Generates corresponding '.map' file. */ | ||
// "outFile": "./", /* Concatenate and emit output to single file. */ | ||
"outDir": "./dist" /* Redirect output structure to the directory. */, | ||
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ | ||
// "composite": true, /* Enable project compilation */ | ||
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ | ||
// "removeComments": true, /* Do not emit comments to output. */ | ||
// "noEmit": true, /* Do not emit outputs. */ | ||
// "importHelpers": true, /* Import emit helpers from 'tslib'. */ | ||
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ | ||
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ | ||
/* Strict Type-Checking Options */ | ||
"strict": true, /* Enable all strict type-checking options. */ | ||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ | ||
// "strictNullChecks": true, /* Enable strict null checks. */ | ||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */ | ||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ | ||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ | ||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ | ||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ | ||
/* Strict Type-Checking Options */ | ||
"strict": true /* Enable all strict type-checking options. */, | ||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ | ||
// "strictNullChecks": true, /* Enable strict null checks. */ | ||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */ | ||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ | ||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ | ||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ | ||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ | ||
/* Additional Checks */ | ||
// "noUnusedLocals": true, /* Report errors on unused locals. */ | ||
// "noUnusedParameters": true, /* Report errors on unused parameters. */ | ||
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ | ||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ | ||
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ | ||
/* Additional Checks */ | ||
// "noUnusedLocals": true, /* Report errors on unused locals. */ | ||
// "noUnusedParameters": true, /* Report errors on unused parameters. */ | ||
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ | ||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ | ||
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ | ||
/* Module Resolution Options */ | ||
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ | ||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ | ||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ | ||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ | ||
// "typeRoots": [], /* List of folders to include type definitions from. */ | ||
// "types": [], /* Type declaration files to be included in compilation. */ | ||
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ | ||
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ | ||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ | ||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ | ||
/* Module Resolution Options */ | ||
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ | ||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ | ||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ | ||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ | ||
// "typeRoots": [], /* List of folders to include type definitions from. */ | ||
// "types": [], /* Type declaration files to be included in compilation. */ | ||
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ | ||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, | ||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ | ||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ | ||
/* Source Map Options */ | ||
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ | ||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ | ||
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ | ||
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ | ||
/* Source Map Options */ | ||
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ | ||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ | ||
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ | ||
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ | ||
/* Experimental Options */ | ||
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ | ||
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ | ||
/* Experimental Options */ | ||
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ | ||
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ | ||
/* Advanced Options */ | ||
"skipLibCheck": true, /* Skip type checking of declaration files. */ | ||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, | ||
/* Advanced Options */ | ||
"skipLibCheck": true /* Skip type checking of declaration files. */, | ||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, | ||
"resolveJsonModule": true | ||
} | ||
"resolveJsonModule": true | ||
} | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1637816
63
104663
284
7
3
4
+ Addedcommander@^9.4.0
+ Addedcommander@9.5.0(transitive)