diff --git a/esprima/esprima.d.ts b/esprima/esprima.d.ts
index 10e37a530..c46f20b28 100644
--- a/esprima/esprima.d.ts
+++ b/esprima/esprima.d.ts
@@ -6,29 +6,99 @@
///
declare module esprima {
- var version: string
- function parse(code: string, options?: Options): ESTree.Program
- function tokenize(code: string, options?: Options): Array
+
+ const version: string;
+
+ function parse(code: string, options?: Options): ESTree.Program;
+ function tokenize(code: string, options?: Options): Array;
interface Token {
- type: string
- value: string
+ type: string;
+ value: string;
}
interface Comment extends ESTree.Node {
- value: string
+ value: string;
}
interface Options {
- loc?: boolean
- range?: boolean
- raw?: boolean
- tokens?: boolean
- comment?: boolean
- attachComment?: boolean
- tolerant?: boolean
- source?: boolean
+ loc?: boolean;
+ range?: boolean;
+ raw?: boolean;
+ tokens?: boolean;
+ comment?: boolean;
+ attachComment?: boolean;
+ tolerant?: boolean;
+ source?: boolean;
}
+
+ const Syntax: {
+ AssignmentExpression: string,
+ AssignmentPattern: string,
+ ArrayExpression: string,
+ ArrayPattern: string,
+ ArrowFunctionExpression: string,
+ BlockStatement: string,
+ BinaryExpression: string,
+ BreakStatement: string,
+ CallExpression: string,
+ CatchClause: string,
+ ClassBody: string,
+ ClassDeclaration: string,
+ ClassExpression: string,
+ ConditionalExpression: string,
+ ContinueStatement: string,
+ DoWhileStatement: string,
+ DebuggerStatement: string,
+ EmptyStatement: string,
+ ExportAllDeclaration: string,
+ ExportDefaultDeclaration: string,
+ ExportNamedDeclaration: string,
+ ExportSpecifier: string,
+ ExpressionStatement: string,
+ ForStatement: string,
+ ForOfStatement: string,
+ ForInStatement: string,
+ FunctionDeclaration: string,
+ FunctionExpression: string,
+ Identifier: string,
+ IfStatement: string,
+ ImportDeclaration: string,
+ ImportDefaultSpecifier: string,
+ ImportNamespaceSpecifier: string,
+ ImportSpecifier: string,
+ Literal: string,
+ LabeledStatement: string,
+ LogicalExpression: string,
+ MemberExpression: string,
+ MethodDefinition: string,
+ NewExpression: string,
+ ObjectExpression: string,
+ ObjectPattern: string,
+ Program: string,
+ Property: string,
+ RestElement: string,
+ ReturnStatement: string,
+ SequenceExpression: string,
+ SpreadElement: string,
+ Super: string,
+ SwitchCase: string,
+ SwitchStatement: string,
+ TaggedTemplateExpression: string,
+ TemplateElement: string,
+ TemplateLiteral: string,
+ ThisExpression: string,
+ ThrowStatement: string,
+ TryStatement: string,
+ UnaryExpression: string,
+ UpdateExpression: string,
+ VariableDeclaration: string,
+ VariableDeclarator: string,
+ WhileStatement: string,
+ WithStatement: string,
+ YieldExpression: string
+ };
+
}
declare module "esprima" {