js-ast-parser
Version:
把javascript代码字符串解析为AST对象
20 lines (19 loc) • 798 B
TypeScript
import { Definition } from "./Definition";
import { Scope } from "./Scope";
export declare const DefinitionCode: {
ConstVariable: number;
Variable: number;
ImportSpecifier: number;
FunctionDeclaration: number;
ClassDeclaration: number;
Property: number;
Method: number;
};
export declare function getConsoleDefinition(scope: any): Definition;
export declare const ObjectDefinitions: any[];
export declare function getGlobalDefinitions(scope: Scope, definitions?: any): any;
export declare function getArrayDefininitons(): any[];
export declare function getObjectDefinitions(): any[];
export declare function getFunctionDefinitions(): any[];
export declare function getRegExpDefinitions(): any[];
export declare function getStringDefinitions(): any[];