UNPKG

1.02 kBTypeScriptView Raw
1import { TSESLint } from '@typescript-eslint/experimental-utils';
2import { AST_NODE_TYPES, ParserServices, TSESTree, visitorKeys } from '@typescript-eslint/typescript-estree';
3import { analyzeScope } from './analyze-scope';
4declare type ParserOptions = TSESLint.ParserOptions;
5interface ParseForESLintResult {
6 ast: TSESTree.Program & {
7 range?: [number, number];
8 tokens?: TSESTree.Token[];
9 comments?: TSESTree.Comment[];
10 };
11 services: ParserServices;
12 visitorKeys: typeof visitorKeys;
13 scopeManager: ReturnType<typeof analyzeScope>;
14}
15export declare const version: any;
16export declare const Syntax: Readonly<typeof AST_NODE_TYPES>;
17export declare function parse(code: string, options?: ParserOptions): ParseForESLintResult['ast'];
18export declare function parseForESLint(code: string, options?: ParserOptions | null): ParseForESLintResult;
19export { ParserServices, ParserOptions };
20export { clearCaches } from '@typescript-eslint/typescript-estree';
21//# sourceMappingURL=parser.d.ts.map
\No newline at end of file