Add delegate for parse (#18222)

* Add delegate for parse

* explicit type of node param
This commit is contained in:
AngryPowman
2017-07-25 01:14:27 +08:00
committed by Andy
parent 5dcf627501
commit 9ffab73263

View File

@@ -13,7 +13,7 @@ declare namespace esprima {
const version: string;
function parse(code: string, options?: Options): ESTree.Program;
function parse(code: string, options?: Options, delegate?: (node: ESTree.Node, meta: any) => void): ESTree.Program;
function tokenize(code: string, options?: Options): Array<Token>;
interface Token {
@@ -101,4 +101,4 @@ declare namespace esprima {
YieldExpression: 'YieldExpression'
};
}
}