1 | import eslint from 'eslint';
|
2 | import estree from 'estree';
|
3 |
|
4 | declare global {
|
5 | interface ASTNode extends estree.BaseNode {
|
6 | [_: string]: any;
|
7 | }
|
8 | type Scope = eslint.Scope.Scope;
|
9 | type Token = eslint.AST.Token;
|
10 | type Fixer = eslint.Rule.RuleFixer;
|
11 | type JSXAttribute = ASTNode;
|
12 | type JSXElement = ASTNode;
|
13 | type JSXFragment = ASTNode;
|
14 | type JSXSpreadAttribute = ASTNode;
|
15 |
|
16 | interface Context extends eslint.SourceCode {
|
17 | getFirstTokens(node: estree.Node | ASTNode, options?: eslint.SourceCode.CursorWithCountOptions): eslint.AST.Token[];
|
18 | }
|
19 |
|
20 | type TypeDeclarationBuilder = (annotation: ASTNode, parentName: string, seen: Set<typeof annotation>) => object;
|
21 |
|
22 | type TypeDeclarationBuilders = {
|
23 | [k in string]: TypeDeclarationBuilder;
|
24 | };
|
25 |
|
26 | type UnionTypeDefinition = {
|
27 | type: 'union' | 'shape';
|
28 | children: unknown[];
|
29 | };
|
30 | }
|