File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1
1
import type { ESLintExtendedProgram , ESLintProgram } from "../ast"
2
2
3
+ /**
4
+ * The type of basic ESLint custom parser.
5
+ * e.g. espree
6
+ */
3
7
export type BasicParserObject < R = ESLintProgram > = {
4
8
parse ( code : string , options : any ) : R
5
9
parseForESLint : undefined
6
10
}
11
+ /**
12
+ * The type of ESLint custom parser enhanced for ESLint.
13
+ * e.g. @babel/eslint-parser, @typescript-eslint/parser
14
+ */
7
15
export type EnhancedParserObject < R = ESLintExtendedProgram > = {
8
16
parseForESLint ( code : string , options : any ) : R
9
17
parse : undefined
10
18
}
11
19
20
+ /**
21
+ * The type of ESLint (custom) parsers.
22
+ */
12
23
export type ParserObject < R1 = ESLintExtendedProgram , R2 = ESLintProgram > =
13
24
| EnhancedParserObject < R1 >
14
25
| BasicParserObject < R2 >
You can’t perform that action at this time.
0 commit comments