UNPKG

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