.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / @typescript-eslint / experimental-utils / dist / ts-eslint / Scope.d.ts
1 import { TSESTree } from '../ts-estree';
2 declare namespace Scope {
3     interface ScopeManager {
4         scopes: Scope[];
5         globalScope: Scope | null;
6         acquire(node: TSESTree.Node, inner?: boolean): Scope | null;
7         getDeclaredVariables(node: TSESTree.Node): Variable[];
8     }
9     interface Reference {
10         identifier: TSESTree.Identifier;
11         from: Scope;
12         resolved: Variable | null;
13         writeExpr: TSESTree.Node | null;
14         init: boolean;
15         isWrite(): boolean;
16         isRead(): boolean;
17         isWriteOnly(): boolean;
18         isReadOnly(): boolean;
19         isReadWrite(): boolean;
20     }
21     interface Variable {
22         name: string;
23         identifiers: TSESTree.Identifier[];
24         references: Reference[];
25         defs: Definition[];
26         scope: Scope;
27         eslintUsed?: boolean;
28     }
29     interface Scope {
30         type: 'block' | 'catch' | 'class' | 'for' | 'function' | 'function-expression-name' | 'global' | 'module' | 'switch' | 'with' | 'TDZ';
31         isStrict: boolean;
32         upper: Scope | null;
33         childScopes: Scope[];
34         variableScope: Scope;
35         block: TSESTree.Node;
36         variables: Variable[];
37         set: Map<string, Variable>;
38         references: Reference[];
39         through: Reference[];
40         functionExpressionScope: boolean;
41     }
42     type DefinitionType = {
43         type: 'CatchClause';
44         node: TSESTree.CatchClause;
45         parent: null;
46     } | {
47         type: 'ClassName';
48         node: TSESTree.ClassDeclaration | TSESTree.ClassExpression;
49         parent: null;
50     } | {
51         type: 'FunctionName';
52         node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression;
53         parent: null;
54     } | {
55         type: 'ImplicitGlobalVariable';
56         node: TSESTree.Program;
57         parent: null;
58     } | {
59         type: 'ImportBinding';
60         node: TSESTree.ImportSpecifier | TSESTree.ImportDefaultSpecifier | TSESTree.ImportNamespaceSpecifier;
61         parent: TSESTree.ImportDeclaration;
62     } | {
63         type: 'Parameter';
64         node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression;
65         parent: null;
66     } | {
67         type: 'Variable';
68         node: TSESTree.VariableDeclarator;
69         parent: TSESTree.VariableDeclaration;
70     };
71     type Definition = DefinitionType & {
72         name: TSESTree.Identifier;
73     };
74 }
75 export { Scope };
76 //# sourceMappingURL=Scope.d.ts.map