1 import { TSESTree } from '../ts-estree';
\r
2 declare namespace Scope {
\r
3 interface ScopeManager {
\r
5 globalScope: Scope | null;
\r
6 acquire(node: TSESTree.Node, inner?: boolean): Scope | null;
\r
7 getDeclaredVariables(node: TSESTree.Node): Variable[];
\r
9 interface Reference {
\r
10 identifier: TSESTree.Identifier;
\r
12 resolved: Variable | null;
\r
13 writeExpr: TSESTree.Node | null;
\r
17 isWriteOnly(): boolean;
\r
18 isReadOnly(): boolean;
\r
19 isReadWrite(): boolean;
\r
21 interface Variable {
\r
23 identifiers: TSESTree.Identifier[];
\r
24 references: Reference[];
\r
27 eslintUsed?: boolean;
\r
30 type: 'block' | 'catch' | 'class' | 'for' | 'function' | 'function-expression-name' | 'global' | 'module' | 'switch' | 'with' | 'TDZ';
\r
32 upper: Scope | null;
\r
33 childScopes: Scope[];
\r
34 variableScope: Scope;
\r
35 block: TSESTree.Node;
\r
36 variables: Variable[];
\r
37 set: Map<string, Variable>;
\r
38 references: Reference[];
\r
39 through: Reference[];
\r
40 functionExpressionScope: boolean;
\r
42 type DefinitionType = {
\r
43 type: 'CatchClause';
\r
44 node: TSESTree.CatchClause;
\r
48 node: TSESTree.ClassDeclaration | TSESTree.ClassExpression;
\r
51 type: 'FunctionName';
\r
52 node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression;
\r
55 type: 'ImplicitGlobalVariable';
\r
56 node: TSESTree.Program;
\r
59 type: 'ImportBinding';
\r
60 node: TSESTree.ImportSpecifier | TSESTree.ImportDefaultSpecifier | TSESTree.ImportNamespaceSpecifier;
\r
61 parent: TSESTree.ImportDeclaration;
\r
64 node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression;
\r
68 node: TSESTree.VariableDeclarator;
\r
69 parent: TSESTree.VariableDeclaration;
\r
71 type Definition = DefinitionType & {
\r
72 name: TSESTree.Identifier;
\r
76 //# sourceMappingURL=Scope.d.ts.map
\r