UNPKG

774 BTypeScriptView Raw
1import { ParserOptions, TSESTree } from '@typescript-eslint/types';
2import { ParserServices, visitorKeys } from '@typescript-eslint/typescript-estree';
3import { ScopeManager } from '@typescript-eslint/scope-manager';
4interface ParseForESLintResult {
5 ast: TSESTree.Program & {
6 range?: [number, number];
7 tokens?: TSESTree.Token[];
8 comments?: TSESTree.Comment[];
9 };
10 services: ParserServices;
11 visitorKeys: typeof visitorKeys;
12 scopeManager: ScopeManager;
13}
14declare function parse(code: string, options?: ParserOptions): ParseForESLintResult['ast'];
15declare function parseForESLint(code: string, options?: ParserOptions | null): ParseForESLintResult;
16export { parse, parseForESLint, ParserOptions };
17//# sourceMappingURL=parser.d.ts.map
\No newline at end of file