1 import { TSESTree } from '../ts-estree';
\r
2 import { EcmaVersion } from '../ts-eslint';
\r
3 import { Scope } from './Scope';
\r
4 import { Variable } from './Variable';
\r
5 interface ScopeManagerOptions {
\r
7 optimistic?: boolean;
\r
8 ignoreEval?: boolean;
\r
9 nodejsScope?: boolean;
\r
10 sourceType?: 'module' | 'script';
\r
11 impliedStrict?: boolean;
\r
12 ecmaVersion?: EcmaVersion;
\r
14 interface ScopeManager {
\r
15 __options: ScopeManagerOptions;
\r
16 __currentScope: Scope;
\r
17 __nodeToScope: WeakMap<TSESTree.Node, Scope[]>;
\r
18 __declaredVariables: WeakMap<TSESTree.Node, Variable[]>;
\r
21 __useDirective(): boolean;
\r
22 __isOptimistic(): boolean;
\r
23 __ignoreEval(): boolean;
\r
24 __isNodejsScope(): boolean;
\r
25 isModule(): boolean;
\r
26 isImpliedStrict(): boolean;
\r
27 isStrictModeSupported(): boolean;
\r
28 __get(node: TSESTree.Node): Scope | undefined;
\r
29 getDeclaredVariables(node: TSESTree.Node): Variable[];
\r
30 acquire(node: TSESTree.Node, inner?: boolean): Scope | null;
\r
31 acquireAll(node: TSESTree.Node): Scope | null;
\r
32 release(node: TSESTree.Node, inner?: boolean): Scope | null;
\r
35 __nestScope<T extends Scope>(scope: T): T;
\r
36 __nestGlobalScope(node: TSESTree.Node): Scope;
\r
37 __nestBlockScope(node: TSESTree.Node): Scope;
\r
38 __nestFunctionScope(node: TSESTree.Node, isMethodDefinition: boolean): Scope;
\r
39 __nestForScope(node: TSESTree.Node): Scope;
\r
40 __nestCatchScope(node: TSESTree.Node): Scope;
\r
41 __nestWithScope(node: TSESTree.Node): Scope;
\r
42 __nestClassScope(node: TSESTree.Node): Scope;
\r
43 __nestSwitchScope(node: TSESTree.Node): Scope;
\r
44 __nestModuleScope(node: TSESTree.Node): Scope;
\r
45 __nestFunctionExpressionNameScope(node: TSESTree.Node): Scope;
\r
48 declare const ScopeManager: new (options: ScopeManagerOptions) => ScopeManager;
\r
49 export { ScopeManager, ScopeManagerOptions };
\r
50 //# sourceMappingURL=ScopeManager.d.ts.map
\r