@typescript-eslint/utils 6.0.0-alpha.81 → 6.0.0-alpha.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_ts4.2/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +4 -4
- package/_ts4.2/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +4 -4
- package/_ts4.2/dist/ast-utils/eslint-utils/astUtilities.d.ts +6 -6
- package/_ts4.2/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +2 -2
- package/_ts4.2/dist/eslint-utils/rule-tester/RuleTester.d.ts +1 -1
- package/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +4 -4
- package/dist/ast-utils/eslint-utils/PatternMatcher.js +2 -2
- package/dist/ast-utils/eslint-utils/PatternMatcher.js.map +1 -1
- package/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +4 -4
- package/dist/ast-utils/eslint-utils/ReferenceTracker.js +2 -2
- package/dist/ast-utils/eslint-utils/ReferenceTracker.js.map +1 -1
- package/dist/ast-utils/eslint-utils/astUtilities.d.ts +6 -6
- package/dist/ast-utils/eslint-utils/astUtilities.js +7 -7
- package/dist/ast-utils/eslint-utils/astUtilities.js.map +1 -1
- package/dist/ast-utils/eslint-utils/predicates.js +1 -1
- package/dist/ast-utils/eslint-utils/predicates.js.map +1 -1
- package/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +2 -2
- package/dist/ast-utils/eslint-utils/scopeAnalysis.js +3 -3
- package/dist/ast-utils/eslint-utils/scopeAnalysis.js.map +1 -1
- package/dist/eslint-utils/rule-tester/RuleTester.d.ts +1 -1
- package/dist/eslint-utils/rule-tester/RuleTester.d.ts.map +1 -1
- package/dist/eslint-utils/rule-tester/RuleTester.js +2 -4
- package/dist/eslint-utils/rule-tester/RuleTester.js.map +1 -1
- package/package.json +7 -7
- package/_ts4.2/dist/ts-eslint-scope/Definition.d.ts +0 -19
- package/_ts4.2/dist/ts-eslint-scope/Options.d.ts +0 -15
- package/_ts4.2/dist/ts-eslint-scope/PatternVisitor.d.ts +0 -25
- package/_ts4.2/dist/ts-eslint-scope/Reference.d.ts +0 -28
- package/_ts4.2/dist/ts-eslint-scope/Referencer.d.ts +0 -55
- package/_ts4.2/dist/ts-eslint-scope/Scope.d.ts +0 -103
- package/_ts4.2/dist/ts-eslint-scope/ScopeManager.d.ts +0 -50
- package/_ts4.2/dist/ts-eslint-scope/Variable.d.ts +0 -17
- package/_ts4.2/dist/ts-eslint-scope/analyze.d.ts +0 -16
- package/_ts4.2/dist/ts-eslint-scope/index.d.ts +0 -11
- package/dist/ts-eslint-scope/Definition.d.ts +0 -19
- package/dist/ts-eslint-scope/Definition.d.ts.map +0 -1
- package/dist/ts-eslint-scope/Definition.js +0 -9
- package/dist/ts-eslint-scope/Definition.js.map +0 -1
- package/dist/ts-eslint-scope/Options.d.ts +0 -15
- package/dist/ts-eslint-scope/Options.d.ts.map +0 -1
- package/dist/ts-eslint-scope/Options.js +0 -3
- package/dist/ts-eslint-scope/Options.js.map +0 -1
- package/dist/ts-eslint-scope/PatternVisitor.d.ts +0 -25
- package/dist/ts-eslint-scope/PatternVisitor.d.ts.map +0 -1
- package/dist/ts-eslint-scope/PatternVisitor.js +0 -10
- package/dist/ts-eslint-scope/PatternVisitor.js.map +0 -1
- package/dist/ts-eslint-scope/Reference.d.ts +0 -28
- package/dist/ts-eslint-scope/Reference.d.ts.map +0 -1
- package/dist/ts-eslint-scope/Reference.js +0 -10
- package/dist/ts-eslint-scope/Reference.js.map +0 -1
- package/dist/ts-eslint-scope/Referencer.d.ts +0 -55
- package/dist/ts-eslint-scope/Referencer.d.ts.map +0 -1
- package/dist/ts-eslint-scope/Referencer.js +0 -11
- package/dist/ts-eslint-scope/Referencer.js.map +0 -1
- package/dist/ts-eslint-scope/Scope.d.ts +0 -103
- package/dist/ts-eslint-scope/Scope.d.ts.map +0 -1
- package/dist/ts-eslint-scope/Scope.js +0 -28
- package/dist/ts-eslint-scope/Scope.js.map +0 -1
- package/dist/ts-eslint-scope/ScopeManager.d.ts +0 -50
- package/dist/ts-eslint-scope/ScopeManager.d.ts.map +0 -1
- package/dist/ts-eslint-scope/ScopeManager.js +0 -10
- package/dist/ts-eslint-scope/ScopeManager.js.map +0 -1
- package/dist/ts-eslint-scope/Variable.d.ts +0 -17
- package/dist/ts-eslint-scope/Variable.d.ts.map +0 -1
- package/dist/ts-eslint-scope/Variable.js +0 -10
- package/dist/ts-eslint-scope/Variable.js.map +0 -1
- package/dist/ts-eslint-scope/analyze.d.ts +0 -16
- package/dist/ts-eslint-scope/analyze.d.ts.map +0 -1
- package/dist/ts-eslint-scope/analyze.js +0 -7
- package/dist/ts-eslint-scope/analyze.js.map +0 -1
- package/dist/ts-eslint-scope/index.d.ts +0 -11
- package/dist/ts-eslint-scope/index.d.ts.map +0 -1
- package/dist/ts-eslint-scope/index.js +0 -29
- package/dist/ts-eslint-scope/index.js.map +0 -1
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { TSESTree } from '../ts-estree';
|
|
2
|
-
import type { Scope } from './Scope';
|
|
3
|
-
import type { Variable } from './Variable';
|
|
4
|
-
export type ReferenceFlag = 0x1 | 0x2 | 0x3;
|
|
5
|
-
interface Reference {
|
|
6
|
-
identifier: TSESTree.Identifier;
|
|
7
|
-
from: Scope;
|
|
8
|
-
resolved: Variable | null;
|
|
9
|
-
writeExpr: TSESTree.Node | null;
|
|
10
|
-
init: boolean;
|
|
11
|
-
partial: boolean;
|
|
12
|
-
__maybeImplicitGlobal: boolean;
|
|
13
|
-
tainted?: boolean;
|
|
14
|
-
typeMode?: boolean;
|
|
15
|
-
isWrite(): boolean;
|
|
16
|
-
isRead(): boolean;
|
|
17
|
-
isWriteOnly(): boolean;
|
|
18
|
-
isReadOnly(): boolean;
|
|
19
|
-
isReadWrite(): boolean;
|
|
20
|
-
}
|
|
21
|
-
declare const Reference: {
|
|
22
|
-
new (identifier: TSESTree.Identifier, scope: Scope, flag?: ReferenceFlag, writeExpr?: TSESTree.Node | null, maybeImplicitGlobal?: boolean, partial?: boolean, init?: boolean): Reference;
|
|
23
|
-
READ: 0x1;
|
|
24
|
-
WRITE: 0x2;
|
|
25
|
-
RW: 0x3;
|
|
26
|
-
};
|
|
27
|
-
export { Reference };
|
|
28
|
-
//# sourceMappingURL=Reference.d.ts.map
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { TSESTree } from '../ts-estree';
|
|
2
|
-
import type { PatternVisitorCallback, PatternVisitorOptions, Visitor } from './Options';
|
|
3
|
-
import type { Scope } from './Scope';
|
|
4
|
-
import type { ScopeManager } from './ScopeManager';
|
|
5
|
-
interface Referencer<SM extends ScopeManager> extends Visitor {
|
|
6
|
-
isInnerMethodDefinition: boolean;
|
|
7
|
-
options: any;
|
|
8
|
-
scopeManager: SM;
|
|
9
|
-
parent?: TSESTree.Node;
|
|
10
|
-
currentScope(): Scope;
|
|
11
|
-
close(node: TSESTree.Node): void;
|
|
12
|
-
pushInnerMethodDefinition(isInnerMethodDefinition: boolean): boolean;
|
|
13
|
-
popInnerMethodDefinition(isInnerMethodDefinition: boolean): void;
|
|
14
|
-
referencingDefaultValue(pattern: any, assignments: any, maybeImplicitGlobal: any, init: boolean): void;
|
|
15
|
-
visitPattern(node: TSESTree.Node, options: PatternVisitorOptions, callback: PatternVisitorCallback): void;
|
|
16
|
-
visitFunction(node: TSESTree.Node): void;
|
|
17
|
-
visitClass(node: TSESTree.Node): void;
|
|
18
|
-
visitProperty(node: TSESTree.Node): void;
|
|
19
|
-
visitForIn(node: TSESTree.Node): void;
|
|
20
|
-
visitVariableDeclaration(variableTargetScope: any, type: any, node: TSESTree.Node, index: any): void;
|
|
21
|
-
AssignmentExpression(node: TSESTree.Node): void;
|
|
22
|
-
CatchClause(node: TSESTree.Node): void;
|
|
23
|
-
Program(node: TSESTree.Program): void;
|
|
24
|
-
Identifier(node: TSESTree.Identifier): void;
|
|
25
|
-
UpdateExpression(node: TSESTree.Node): void;
|
|
26
|
-
MemberExpression(node: TSESTree.Node): void;
|
|
27
|
-
Property(node: TSESTree.Node): void;
|
|
28
|
-
MethodDefinition(node: TSESTree.Node): void;
|
|
29
|
-
BreakStatement(): void;
|
|
30
|
-
ContinueStatement(): void;
|
|
31
|
-
LabeledStatement(node: TSESTree.Node): void;
|
|
32
|
-
ForStatement(node: TSESTree.Node): void;
|
|
33
|
-
ClassExpression(node: TSESTree.Node): void;
|
|
34
|
-
ClassDeclaration(node: TSESTree.Node): void;
|
|
35
|
-
CallExpression(node: TSESTree.Node): void;
|
|
36
|
-
BlockStatement(node: TSESTree.Node): void;
|
|
37
|
-
ThisExpression(): void;
|
|
38
|
-
WithStatement(node: TSESTree.Node): void;
|
|
39
|
-
VariableDeclaration(node: TSESTree.Node): void;
|
|
40
|
-
SwitchStatement(node: TSESTree.Node): void;
|
|
41
|
-
FunctionDeclaration(node: TSESTree.Node): void;
|
|
42
|
-
FunctionExpression(node: TSESTree.Node): void;
|
|
43
|
-
ForOfStatement(node: TSESTree.Node): void;
|
|
44
|
-
ForInStatement(node: TSESTree.Node): void;
|
|
45
|
-
ArrowFunctionExpression(node: TSESTree.Node): void;
|
|
46
|
-
ImportDeclaration(node: TSESTree.Node): void;
|
|
47
|
-
visitExportDeclaration(node: TSESTree.Node): void;
|
|
48
|
-
ExportDeclaration(node: TSESTree.Node): void;
|
|
49
|
-
ExportNamedDeclaration(node: TSESTree.Node): void;
|
|
50
|
-
ExportSpecifier(node: TSESTree.Node): void;
|
|
51
|
-
MetaProperty(): void;
|
|
52
|
-
}
|
|
53
|
-
declare const Referencer: new <SM extends ScopeManager>(options: any, scopeManager: SM) => Referencer<SM>;
|
|
54
|
-
export { Referencer };
|
|
55
|
-
//# sourceMappingURL=Referencer.d.ts.map
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import type { TSESTree } from '../ts-estree';
|
|
2
|
-
import type { Definition } from './Definition';
|
|
3
|
-
import type { Reference, ReferenceFlag } from './Reference';
|
|
4
|
-
import type { ScopeManager } from './ScopeManager';
|
|
5
|
-
import type { Variable } from './Variable';
|
|
6
|
-
type ScopeType = 'block' | 'catch' | 'class' | 'for' | 'function' | 'function-expression-name' | 'global' | 'module' | 'switch' | 'with' | 'TDZ' | 'enum' | 'empty-function';
|
|
7
|
-
interface Scope {
|
|
8
|
-
type: ScopeType;
|
|
9
|
-
isStrict: boolean;
|
|
10
|
-
upper: Scope | null;
|
|
11
|
-
childScopes: Scope[];
|
|
12
|
-
variableScope: Scope;
|
|
13
|
-
block: TSESTree.Node;
|
|
14
|
-
variables: Variable[];
|
|
15
|
-
set: Map<string, Variable>;
|
|
16
|
-
references: Reference[];
|
|
17
|
-
through: Reference[];
|
|
18
|
-
thisFound?: boolean;
|
|
19
|
-
taints: Map<string, boolean>;
|
|
20
|
-
functionExpressionScope: boolean;
|
|
21
|
-
__left: Reference[];
|
|
22
|
-
__shouldStaticallyClose(scopeManager: ScopeManager): boolean;
|
|
23
|
-
__shouldStaticallyCloseForGlobal(ref: any): boolean;
|
|
24
|
-
__staticCloseRef(ref: any): void;
|
|
25
|
-
__dynamicCloseRef(ref: any): void;
|
|
26
|
-
__globalCloseRef(ref: any): void;
|
|
27
|
-
__close(scopeManager: ScopeManager): Scope;
|
|
28
|
-
__isValidResolution(ref: any, variable: any): variable is Variable;
|
|
29
|
-
__resolve(ref: Reference): boolean;
|
|
30
|
-
__delegateToUpperScope(ref: any): void;
|
|
31
|
-
__addDeclaredVariablesOfNode(variable: any, node: TSESTree.Node): void;
|
|
32
|
-
__defineGeneric(name: string, set: Map<string, Variable>, variables: Variable[], node: TSESTree.Identifier, def: Definition): void;
|
|
33
|
-
__define(node: TSESTree.Node, def: Definition): void;
|
|
34
|
-
__referencing(node: TSESTree.Node, assign?: ReferenceFlag, writeExpr?: TSESTree.Node, maybeImplicitGlobal?: any, partial?: any, init?: any): void;
|
|
35
|
-
__detectEval(): void;
|
|
36
|
-
__detectThis(): void;
|
|
37
|
-
__isClosed(): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* returns resolved {Reference}
|
|
40
|
-
* @method Scope#resolve
|
|
41
|
-
* @param {Espree.Identifier} ident - identifier to be resolved.
|
|
42
|
-
* @returns {Reference} reference
|
|
43
|
-
*/
|
|
44
|
-
resolve(ident: TSESTree.Node): Reference;
|
|
45
|
-
/**
|
|
46
|
-
* returns this scope is static
|
|
47
|
-
* @method Scope#isStatic
|
|
48
|
-
* @returns {boolean} static
|
|
49
|
-
*/
|
|
50
|
-
isStatic(): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* returns this scope has materialized arguments
|
|
53
|
-
* @method Scope#isArgumentsMaterialized
|
|
54
|
-
* @returns {boolean} arguments materialized
|
|
55
|
-
*/
|
|
56
|
-
isArgumentsMaterialized(): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* returns this scope has materialized `this` reference
|
|
59
|
-
* @method Scope#isThisMaterialized
|
|
60
|
-
* @returns {boolean} this materialized
|
|
61
|
-
*/
|
|
62
|
-
isThisMaterialized(): boolean;
|
|
63
|
-
isUsedName(name: any): boolean;
|
|
64
|
-
}
|
|
65
|
-
interface ScopeConstructor {
|
|
66
|
-
new (scopeManager: ScopeManager, type: ScopeType, upperScope: Scope | null, block: TSESTree.Node | null, isMethodDefinition: boolean): Scope;
|
|
67
|
-
}
|
|
68
|
-
declare const Scope: ScopeConstructor;
|
|
69
|
-
interface ScopeChildConstructorWithUpperScope<T> {
|
|
70
|
-
new (scopeManager: ScopeManager, upperScope: Scope, block: TSESTree.Node | null): T;
|
|
71
|
-
}
|
|
72
|
-
interface GlobalScope extends Scope {
|
|
73
|
-
}
|
|
74
|
-
declare const GlobalScope: ScopeConstructor & (new (scopeManager: ScopeManager, block: TSESTree.Node | null) => GlobalScope);
|
|
75
|
-
interface ModuleScope extends Scope {
|
|
76
|
-
}
|
|
77
|
-
declare const ModuleScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<ModuleScope>;
|
|
78
|
-
interface FunctionExpressionNameScope extends Scope {
|
|
79
|
-
}
|
|
80
|
-
declare const FunctionExpressionNameScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<FunctionExpressionNameScope>;
|
|
81
|
-
interface CatchScope extends Scope {
|
|
82
|
-
}
|
|
83
|
-
declare const CatchScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<CatchScope>;
|
|
84
|
-
interface WithScope extends Scope {
|
|
85
|
-
}
|
|
86
|
-
declare const WithScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<WithScope>;
|
|
87
|
-
interface BlockScope extends Scope {
|
|
88
|
-
}
|
|
89
|
-
declare const BlockScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<BlockScope>;
|
|
90
|
-
interface SwitchScope extends Scope {
|
|
91
|
-
}
|
|
92
|
-
declare const SwitchScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<SwitchScope>;
|
|
93
|
-
interface FunctionScope extends Scope {
|
|
94
|
-
}
|
|
95
|
-
declare const FunctionScope: ScopeConstructor & (new (scopeManager: ScopeManager, upperScope: Scope, block: TSESTree.Node | null, isMethodDefinition: boolean) => FunctionScope);
|
|
96
|
-
interface ForScope extends Scope {
|
|
97
|
-
}
|
|
98
|
-
declare const ForScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<ForScope>;
|
|
99
|
-
interface ClassScope extends Scope {
|
|
100
|
-
}
|
|
101
|
-
declare const ClassScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<ClassScope>;
|
|
102
|
-
export { ScopeType, Scope, GlobalScope, ModuleScope, FunctionExpressionNameScope, CatchScope, WithScope, BlockScope, SwitchScope, FunctionScope, ForScope, ClassScope, };
|
|
103
|
-
//# sourceMappingURL=Scope.d.ts.map
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { EcmaVersion } from '../ts-eslint';
|
|
2
|
-
import type { TSESTree } from '../ts-estree';
|
|
3
|
-
import type { Scope } from './Scope';
|
|
4
|
-
import type { Variable } from './Variable';
|
|
5
|
-
interface ScopeManagerOptions {
|
|
6
|
-
directive?: boolean;
|
|
7
|
-
optimistic?: boolean;
|
|
8
|
-
ignoreEval?: boolean;
|
|
9
|
-
nodejsScope?: boolean;
|
|
10
|
-
sourceType?: 'module' | 'script';
|
|
11
|
-
impliedStrict?: boolean;
|
|
12
|
-
ecmaVersion?: EcmaVersion;
|
|
13
|
-
}
|
|
14
|
-
interface ScopeManager {
|
|
15
|
-
__options: ScopeManagerOptions;
|
|
16
|
-
__currentScope: Scope;
|
|
17
|
-
__nodeToScope: WeakMap<TSESTree.Node, Scope[]>;
|
|
18
|
-
__declaredVariables: WeakMap<TSESTree.Node, Variable[]>;
|
|
19
|
-
scopes: Scope[];
|
|
20
|
-
globalScope: Scope;
|
|
21
|
-
__useDirective(): boolean;
|
|
22
|
-
__isOptimistic(): boolean;
|
|
23
|
-
__ignoreEval(): boolean;
|
|
24
|
-
__isNodejsScope(): boolean;
|
|
25
|
-
isModule(): boolean;
|
|
26
|
-
isImpliedStrict(): boolean;
|
|
27
|
-
isStrictModeSupported(): boolean;
|
|
28
|
-
__get(node: TSESTree.Node): Scope | undefined;
|
|
29
|
-
getDeclaredVariables(node: TSESTree.Node): Variable[];
|
|
30
|
-
acquire(node: TSESTree.Node, inner?: boolean): Scope | null;
|
|
31
|
-
acquireAll(node: TSESTree.Node): Scope | null;
|
|
32
|
-
release(node: TSESTree.Node, inner?: boolean): Scope | null;
|
|
33
|
-
attach(): void;
|
|
34
|
-
detach(): void;
|
|
35
|
-
__nestScope<T extends Scope>(scope: T): T;
|
|
36
|
-
__nestGlobalScope(node: TSESTree.Node): Scope;
|
|
37
|
-
__nestBlockScope(node: TSESTree.Node): Scope;
|
|
38
|
-
__nestFunctionScope(node: TSESTree.Node, isMethodDefinition: boolean): Scope;
|
|
39
|
-
__nestForScope(node: TSESTree.Node): Scope;
|
|
40
|
-
__nestCatchScope(node: TSESTree.Node): Scope;
|
|
41
|
-
__nestWithScope(node: TSESTree.Node): Scope;
|
|
42
|
-
__nestClassScope(node: TSESTree.Node): Scope;
|
|
43
|
-
__nestSwitchScope(node: TSESTree.Node): Scope;
|
|
44
|
-
__nestModuleScope(node: TSESTree.Node): Scope;
|
|
45
|
-
__nestFunctionExpressionNameScope(node: TSESTree.Node): Scope;
|
|
46
|
-
__isES6(): boolean;
|
|
47
|
-
}
|
|
48
|
-
declare const ScopeManager: new (options: ScopeManagerOptions) => ScopeManager;
|
|
49
|
-
export { ScopeManager, ScopeManagerOptions };
|
|
50
|
-
//# sourceMappingURL=ScopeManager.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { TSESTree } from '../ts-estree';
|
|
2
|
-
import type { Definition } from './Definition';
|
|
3
|
-
import type { Reference } from './Reference';
|
|
4
|
-
import type { Scope } from './Scope';
|
|
5
|
-
interface Variable {
|
|
6
|
-
name: string;
|
|
7
|
-
identifiers: TSESTree.Identifier[];
|
|
8
|
-
references: Reference[];
|
|
9
|
-
defs: Definition[];
|
|
10
|
-
eslintUsed?: boolean;
|
|
11
|
-
stack?: unknown;
|
|
12
|
-
tainted?: boolean;
|
|
13
|
-
scope?: Scope;
|
|
14
|
-
}
|
|
15
|
-
declare const Variable: new () => Variable;
|
|
16
|
-
export { Variable };
|
|
17
|
-
//# sourceMappingURL=Variable.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { EcmaVersion } from '../ts-eslint';
|
|
2
|
-
import type { TSESTree } from '../ts-estree';
|
|
3
|
-
import type { ScopeManager } from './ScopeManager';
|
|
4
|
-
interface AnalysisOptions {
|
|
5
|
-
optimistic?: boolean;
|
|
6
|
-
directive?: boolean;
|
|
7
|
-
ignoreEval?: boolean;
|
|
8
|
-
nodejsScope?: boolean;
|
|
9
|
-
impliedStrict?: boolean;
|
|
10
|
-
fallback?: string | ((node: TSESTree.Node) => string[]);
|
|
11
|
-
sourceType?: 'script' | 'module';
|
|
12
|
-
ecmaVersion?: EcmaVersion;
|
|
13
|
-
}
|
|
14
|
-
declare const analyze: (ast: TSESTree.Node, options?: AnalysisOptions) => ScopeManager;
|
|
15
|
-
export { analyze, AnalysisOptions };
|
|
16
|
-
//# sourceMappingURL=analyze.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './analyze';
|
|
2
|
-
export * from './Definition';
|
|
3
|
-
export * from './Options';
|
|
4
|
-
export * from './PatternVisitor';
|
|
5
|
-
export * from './Reference';
|
|
6
|
-
export * from './Referencer';
|
|
7
|
-
export * from './Scope';
|
|
8
|
-
export * from './ScopeManager';
|
|
9
|
-
export * from './Variable';
|
|
10
|
-
export declare const version: string;
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { TSESTree } from '../ts-estree';
|
|
2
|
-
interface Definition {
|
|
3
|
-
type: string;
|
|
4
|
-
name: TSESTree.BindingName;
|
|
5
|
-
node: TSESTree.Node;
|
|
6
|
-
parent?: TSESTree.Node | null;
|
|
7
|
-
index?: number | null;
|
|
8
|
-
kind?: string | null;
|
|
9
|
-
rest?: boolean;
|
|
10
|
-
}
|
|
11
|
-
interface DefinitionConstructor {
|
|
12
|
-
new (type: string, name: TSESTree.BindingName | TSESTree.PropertyName, node: TSESTree.Node, parent?: TSESTree.Node | null, index?: number | null, kind?: string | null): Definition;
|
|
13
|
-
}
|
|
14
|
-
declare const Definition: DefinitionConstructor;
|
|
15
|
-
interface ParameterDefinition extends Definition {
|
|
16
|
-
}
|
|
17
|
-
declare const ParameterDefinition: DefinitionConstructor & (new (name: TSESTree.Node, node: TSESTree.Node, index?: number | null, rest?: boolean) => ParameterDefinition);
|
|
18
|
-
export { Definition, ParameterDefinition };
|
|
19
|
-
//# sourceMappingURL=Definition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Definition.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/Definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC,WAAW,CAAC;IAC3B,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AACD,UAAU,qBAAqB;IAC7B,KACE,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,CAAC,WAAW,GAAG,QAAQ,CAAC,YAAY,EAClD,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,MAAM,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,EAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,EACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GACnB,UAAU,CAAC;CACf;AACD,QAAA,MAAM,UAAU,uBAA4C,CAAC;AAG7D,UAAU,mBAAoB,SAAQ,UAAU;CAAG;AACnD,QAAA,MAAM,mBAAmB,sCAGb,SAAS,IAAI,QACb,SAAS,IAAI,UACX,MAAM,GAAG,IAAI,SACd,OAAO,KACb,mBAAmB,CACvB,CAAC;AAEJ,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ParameterDefinition = exports.Definition = void 0;
|
|
4
|
-
const definition_1 = require("eslint-scope/lib/definition");
|
|
5
|
-
const Definition = definition_1.Definition;
|
|
6
|
-
exports.Definition = Definition;
|
|
7
|
-
const ParameterDefinition = definition_1.ParameterDefinition;
|
|
8
|
-
exports.ParameterDefinition = ParameterDefinition;
|
|
9
|
-
//# sourceMappingURL=Definition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Definition.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/Definition.ts"],"names":[],"mappings":";;;AAAA,4DAGqC;AAuBrC,MAAM,UAAU,GAAG,uBAAyC,CAAC;AAcpD,gCAAU;AAVnB,MAAM,mBAAmB,GACvB,gCAOC,CAAC;AAEiB,kDAAmB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { TSESTree } from '../ts-estree';
|
|
2
|
-
type PatternVisitorCallback = (pattern: TSESTree.Identifier, info: {
|
|
3
|
-
rest: boolean;
|
|
4
|
-
topLevel: boolean;
|
|
5
|
-
assignments: TSESTree.AssignmentPattern[];
|
|
6
|
-
}) => void;
|
|
7
|
-
interface PatternVisitorOptions {
|
|
8
|
-
processRightHandNodes?: boolean;
|
|
9
|
-
}
|
|
10
|
-
interface Visitor {
|
|
11
|
-
visitChildren<T extends TSESTree.BaseNode | undefined | null>(node?: T): void;
|
|
12
|
-
visit<T extends TSESTree.BaseNode | undefined | null>(node?: T): void;
|
|
13
|
-
}
|
|
14
|
-
export { PatternVisitorCallback, PatternVisitorOptions, Visitor };
|
|
15
|
-
//# sourceMappingURL=Options.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Options.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/Options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,KAAK,sBAAsB,GAAG,CAC5B,OAAO,EAAE,QAAQ,CAAC,UAAU,EAC5B,IAAI,EAAE;IACJ,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,QAAQ,CAAC,iBAAiB,EAAE,CAAC;CAC3C,KACE,IAAI,CAAC;AAEV,UAAU,qBAAqB;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,UAAU,OAAO;IACf,aAAa,CAAC,CAAC,SAAS,QAAQ,CAAC,QAAQ,GAAG,SAAS,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAC9E,KAAK,CAAC,CAAC,SAAS,QAAQ,CAAC,QAAQ,GAAG,SAAS,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;CACvE;AAED,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Options.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/Options.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { TSESTree } from '../ts-estree';
|
|
2
|
-
import type { PatternVisitorCallback, PatternVisitorOptions, Visitor } from './Options';
|
|
3
|
-
import type { ScopeManager } from './ScopeManager';
|
|
4
|
-
interface PatternVisitor extends Visitor {
|
|
5
|
-
options: PatternVisitorOptions;
|
|
6
|
-
scopeManager: ScopeManager;
|
|
7
|
-
parent?: TSESTree.Node;
|
|
8
|
-
rightHandNodes: TSESTree.Node[];
|
|
9
|
-
Identifier(pattern: TSESTree.Node): void;
|
|
10
|
-
Property(property: TSESTree.Node): void;
|
|
11
|
-
ArrayPattern(pattern: TSESTree.Node): void;
|
|
12
|
-
AssignmentPattern(pattern: TSESTree.Node): void;
|
|
13
|
-
RestElement(pattern: TSESTree.Node): void;
|
|
14
|
-
MemberExpression(node: TSESTree.Node): void;
|
|
15
|
-
SpreadElement(node: TSESTree.Node): void;
|
|
16
|
-
ArrayExpression(node: TSESTree.Node): void;
|
|
17
|
-
AssignmentExpression(node: TSESTree.Node): void;
|
|
18
|
-
CallExpression(node: TSESTree.Node): void;
|
|
19
|
-
}
|
|
20
|
-
declare const PatternVisitor: {
|
|
21
|
-
new (options: PatternVisitorOptions, rootPattern: TSESTree.BaseNode, callback: PatternVisitorCallback): PatternVisitor;
|
|
22
|
-
isPattern(node: TSESTree.Node): boolean;
|
|
23
|
-
};
|
|
24
|
-
export { PatternVisitor };
|
|
25
|
-
//# sourceMappingURL=PatternVisitor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PatternVisitor.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/PatternVisitor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,OAAO,EACR,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,UAAU,cAAe,SAAQ,OAAO;IACtC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC;IACvB,cAAc,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;IAEhC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IACxC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAC3C,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAChD,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1C,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAC5C,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IACzC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAC3C,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAChD,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;CAC3C;AACD,QAAA,MAAM,cAAc;kBAEP,qBAAqB,eACjB,SAAS,QAAQ,YACpB,sBAAsB,GAC/B,cAAc;oBAGD,SAAS,IAAI,GAAG,OAAO;CACxC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PatternVisitor = void 0;
|
|
7
|
-
const pattern_visitor_1 = __importDefault(require("eslint-scope/lib/pattern-visitor"));
|
|
8
|
-
const PatternVisitor = pattern_visitor_1.default;
|
|
9
|
-
exports.PatternVisitor = PatternVisitor;
|
|
10
|
-
//# sourceMappingURL=PatternVisitor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PatternVisitor.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/PatternVisitor.ts"],"names":[],"mappings":";;;;;;AAAA,uFAAoE;AA2BpE,MAAM,cAAc,GAAG,yBAStB,CAAC;AAEO,wCAAc"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { TSESTree } from '../ts-estree';
|
|
2
|
-
import type { Scope } from './Scope';
|
|
3
|
-
import type { Variable } from './Variable';
|
|
4
|
-
export type ReferenceFlag = 0x1 | 0x2 | 0x3;
|
|
5
|
-
interface Reference {
|
|
6
|
-
identifier: TSESTree.Identifier;
|
|
7
|
-
from: Scope;
|
|
8
|
-
resolved: Variable | null;
|
|
9
|
-
writeExpr: TSESTree.Node | null;
|
|
10
|
-
init: boolean;
|
|
11
|
-
partial: boolean;
|
|
12
|
-
__maybeImplicitGlobal: boolean;
|
|
13
|
-
tainted?: boolean;
|
|
14
|
-
typeMode?: boolean;
|
|
15
|
-
isWrite(): boolean;
|
|
16
|
-
isRead(): boolean;
|
|
17
|
-
isWriteOnly(): boolean;
|
|
18
|
-
isReadOnly(): boolean;
|
|
19
|
-
isReadWrite(): boolean;
|
|
20
|
-
}
|
|
21
|
-
declare const Reference: {
|
|
22
|
-
new (identifier: TSESTree.Identifier, scope: Scope, flag?: ReferenceFlag, writeExpr?: TSESTree.Node | null, maybeImplicitGlobal?: boolean, partial?: boolean, init?: boolean): Reference;
|
|
23
|
-
READ: 0x1;
|
|
24
|
-
WRITE: 0x2;
|
|
25
|
-
RW: 0x3;
|
|
26
|
-
};
|
|
27
|
-
export { Reference };
|
|
28
|
-
//# sourceMappingURL=Reference.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/Reference.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,aAAa,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE5C,UAAU,SAAS;IACjB,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC;IAChC,IAAI,EAAE,KAAK,CAAC;IACZ,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAChC,IAAI,EAAE,OAAO,CAAC;IAEd,OAAO,EAAE,OAAO,CAAC;IACjB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,OAAO,IAAI,OAAO,CAAC;IACnB,MAAM,IAAI,OAAO,CAAC;IAClB,WAAW,IAAI,OAAO,CAAC;IACvB,UAAU,IAAI,OAAO,CAAC;IACtB,WAAW,IAAI,OAAO,CAAC;CACxB;AACD,QAAA,MAAM,SAAS;qBAEC,SAAS,UAAU,SACxB,KAAK,SACL,aAAa,cACR,SAAS,IAAI,GAAG,IAAI,wBACV,OAAO,YACnB,OAAO,SACV,OAAO,GACb,SAAS;UAEN,GAAG;WACF,GAAG;QACN,GAAG;CACR,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Reference = void 0;
|
|
7
|
-
const reference_1 = __importDefault(require("eslint-scope/lib/reference"));
|
|
8
|
-
const Reference = reference_1.default;
|
|
9
|
-
exports.Reference = Reference;
|
|
10
|
-
//# sourceMappingURL=Reference.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/Reference.ts"],"names":[],"mappings":";;;;;;AAAA,2EAAyD;AA0BzD,MAAM,SAAS,GAAG,mBAcjB,CAAC;AAEO,8BAAS"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { TSESTree } from '../ts-estree';
|
|
2
|
-
import type { PatternVisitorCallback, PatternVisitorOptions, Visitor } from './Options';
|
|
3
|
-
import type { Scope } from './Scope';
|
|
4
|
-
import type { ScopeManager } from './ScopeManager';
|
|
5
|
-
interface Referencer<SM extends ScopeManager> extends Visitor {
|
|
6
|
-
isInnerMethodDefinition: boolean;
|
|
7
|
-
options: any;
|
|
8
|
-
scopeManager: SM;
|
|
9
|
-
parent?: TSESTree.Node;
|
|
10
|
-
currentScope(): Scope;
|
|
11
|
-
close(node: TSESTree.Node): void;
|
|
12
|
-
pushInnerMethodDefinition(isInnerMethodDefinition: boolean): boolean;
|
|
13
|
-
popInnerMethodDefinition(isInnerMethodDefinition: boolean): void;
|
|
14
|
-
referencingDefaultValue(pattern: any, assignments: any, maybeImplicitGlobal: any, init: boolean): void;
|
|
15
|
-
visitPattern(node: TSESTree.Node, options: PatternVisitorOptions, callback: PatternVisitorCallback): void;
|
|
16
|
-
visitFunction(node: TSESTree.Node): void;
|
|
17
|
-
visitClass(node: TSESTree.Node): void;
|
|
18
|
-
visitProperty(node: TSESTree.Node): void;
|
|
19
|
-
visitForIn(node: TSESTree.Node): void;
|
|
20
|
-
visitVariableDeclaration(variableTargetScope: any, type: any, node: TSESTree.Node, index: any): void;
|
|
21
|
-
AssignmentExpression(node: TSESTree.Node): void;
|
|
22
|
-
CatchClause(node: TSESTree.Node): void;
|
|
23
|
-
Program(node: TSESTree.Program): void;
|
|
24
|
-
Identifier(node: TSESTree.Identifier): void;
|
|
25
|
-
UpdateExpression(node: TSESTree.Node): void;
|
|
26
|
-
MemberExpression(node: TSESTree.Node): void;
|
|
27
|
-
Property(node: TSESTree.Node): void;
|
|
28
|
-
MethodDefinition(node: TSESTree.Node): void;
|
|
29
|
-
BreakStatement(): void;
|
|
30
|
-
ContinueStatement(): void;
|
|
31
|
-
LabeledStatement(node: TSESTree.Node): void;
|
|
32
|
-
ForStatement(node: TSESTree.Node): void;
|
|
33
|
-
ClassExpression(node: TSESTree.Node): void;
|
|
34
|
-
ClassDeclaration(node: TSESTree.Node): void;
|
|
35
|
-
CallExpression(node: TSESTree.Node): void;
|
|
36
|
-
BlockStatement(node: TSESTree.Node): void;
|
|
37
|
-
ThisExpression(): void;
|
|
38
|
-
WithStatement(node: TSESTree.Node): void;
|
|
39
|
-
VariableDeclaration(node: TSESTree.Node): void;
|
|
40
|
-
SwitchStatement(node: TSESTree.Node): void;
|
|
41
|
-
FunctionDeclaration(node: TSESTree.Node): void;
|
|
42
|
-
FunctionExpression(node: TSESTree.Node): void;
|
|
43
|
-
ForOfStatement(node: TSESTree.Node): void;
|
|
44
|
-
ForInStatement(node: TSESTree.Node): void;
|
|
45
|
-
ArrowFunctionExpression(node: TSESTree.Node): void;
|
|
46
|
-
ImportDeclaration(node: TSESTree.Node): void;
|
|
47
|
-
visitExportDeclaration(node: TSESTree.Node): void;
|
|
48
|
-
ExportDeclaration(node: TSESTree.Node): void;
|
|
49
|
-
ExportNamedDeclaration(node: TSESTree.Node): void;
|
|
50
|
-
ExportSpecifier(node: TSESTree.Node): void;
|
|
51
|
-
MetaProperty(): void;
|
|
52
|
-
}
|
|
53
|
-
declare const Referencer: new <SM extends ScopeManager>(options: any, scopeManager: SM) => Referencer<SM>;
|
|
54
|
-
export { Referencer };
|
|
55
|
-
//# sourceMappingURL=Referencer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Referencer.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/Referencer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,OAAO,EACR,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,UAAU,UAAU,CAAC,EAAE,SAAS,YAAY,CAAE,SAAQ,OAAO;IAC3D,uBAAuB,EAAE,OAAO,CAAC;IACjC,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,EAAE,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC;IAEvB,YAAY,IAAI,KAAK,CAAC;IACtB,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IACjC,yBAAyB,CAAC,uBAAuB,EAA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,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAClD,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAC7C,sBAAsB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAClD,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAC3C,YAAY,IAAI,IAAI,CAAC;CACtB;AACD,QAAA,MAAM,UAAU,yCACyB,GAAG,qCAC3C,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Referencer = void 0;
|
|
7
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
8
|
-
const referencer_1 = __importDefault(require("eslint-scope/lib/referencer"));
|
|
9
|
-
const Referencer = referencer_1.default;
|
|
10
|
-
exports.Referencer = Referencer;
|
|
11
|
-
//# sourceMappingURL=Referencer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Referencer.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/Referencer.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAuD;AACvD,6EAA2D;AA4E3D,MAAM,UAAU,GAAG,oBAElB,CAAC;AAEO,gCAAU"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import type { TSESTree } from '../ts-estree';
|
|
2
|
-
import type { Definition } from './Definition';
|
|
3
|
-
import type { Reference, ReferenceFlag } from './Reference';
|
|
4
|
-
import type { ScopeManager } from './ScopeManager';
|
|
5
|
-
import type { Variable } from './Variable';
|
|
6
|
-
type ScopeType = 'block' | 'catch' | 'class' | 'for' | 'function' | 'function-expression-name' | 'global' | 'module' | 'switch' | 'with' | 'TDZ' | 'enum' | 'empty-function';
|
|
7
|
-
interface Scope {
|
|
8
|
-
type: ScopeType;
|
|
9
|
-
isStrict: boolean;
|
|
10
|
-
upper: Scope | null;
|
|
11
|
-
childScopes: Scope[];
|
|
12
|
-
variableScope: Scope;
|
|
13
|
-
block: TSESTree.Node;
|
|
14
|
-
variables: Variable[];
|
|
15
|
-
set: Map<string, Variable>;
|
|
16
|
-
references: Reference[];
|
|
17
|
-
through: Reference[];
|
|
18
|
-
thisFound?: boolean;
|
|
19
|
-
taints: Map<string, boolean>;
|
|
20
|
-
functionExpressionScope: boolean;
|
|
21
|
-
__left: Reference[];
|
|
22
|
-
__shouldStaticallyClose(scopeManager: ScopeManager): boolean;
|
|
23
|
-
__shouldStaticallyCloseForGlobal(ref: any): boolean;
|
|
24
|
-
__staticCloseRef(ref: any): void;
|
|
25
|
-
__dynamicCloseRef(ref: any): void;
|
|
26
|
-
__globalCloseRef(ref: any): void;
|
|
27
|
-
__close(scopeManager: ScopeManager): Scope;
|
|
28
|
-
__isValidResolution(ref: any, variable: any): variable is Variable;
|
|
29
|
-
__resolve(ref: Reference): boolean;
|
|
30
|
-
__delegateToUpperScope(ref: any): void;
|
|
31
|
-
__addDeclaredVariablesOfNode(variable: any, node: TSESTree.Node): void;
|
|
32
|
-
__defineGeneric(name: string, set: Map<string, Variable>, variables: Variable[], node: TSESTree.Identifier, def: Definition): void;
|
|
33
|
-
__define(node: TSESTree.Node, def: Definition): void;
|
|
34
|
-
__referencing(node: TSESTree.Node, assign?: ReferenceFlag, writeExpr?: TSESTree.Node, maybeImplicitGlobal?: any, partial?: any, init?: any): void;
|
|
35
|
-
__detectEval(): void;
|
|
36
|
-
__detectThis(): void;
|
|
37
|
-
__isClosed(): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* returns resolved {Reference}
|
|
40
|
-
* @method Scope#resolve
|
|
41
|
-
* @param {Espree.Identifier} ident - identifier to be resolved.
|
|
42
|
-
* @returns {Reference} reference
|
|
43
|
-
*/
|
|
44
|
-
resolve(ident: TSESTree.Node): Reference;
|
|
45
|
-
/**
|
|
46
|
-
* returns this scope is static
|
|
47
|
-
* @method Scope#isStatic
|
|
48
|
-
* @returns {boolean} static
|
|
49
|
-
*/
|
|
50
|
-
isStatic(): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* returns this scope has materialized arguments
|
|
53
|
-
* @method Scope#isArgumentsMaterialized
|
|
54
|
-
* @returns {boolean} arguments materialized
|
|
55
|
-
*/
|
|
56
|
-
isArgumentsMaterialized(): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* returns this scope has materialized `this` reference
|
|
59
|
-
* @method Scope#isThisMaterialized
|
|
60
|
-
* @returns {boolean} this materialized
|
|
61
|
-
*/
|
|
62
|
-
isThisMaterialized(): boolean;
|
|
63
|
-
isUsedName(name: any): boolean;
|
|
64
|
-
}
|
|
65
|
-
interface ScopeConstructor {
|
|
66
|
-
new (scopeManager: ScopeManager, type: ScopeType, upperScope: Scope | null, block: TSESTree.Node | null, isMethodDefinition: boolean): Scope;
|
|
67
|
-
}
|
|
68
|
-
declare const Scope: ScopeConstructor;
|
|
69
|
-
interface ScopeChildConstructorWithUpperScope<T> {
|
|
70
|
-
new (scopeManager: ScopeManager, upperScope: Scope, block: TSESTree.Node | null): T;
|
|
71
|
-
}
|
|
72
|
-
interface GlobalScope extends Scope {
|
|
73
|
-
}
|
|
74
|
-
declare const GlobalScope: ScopeConstructor & (new (scopeManager: ScopeManager, block: TSESTree.Node | null) => GlobalScope);
|
|
75
|
-
interface ModuleScope extends Scope {
|
|
76
|
-
}
|
|
77
|
-
declare const ModuleScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<ModuleScope>;
|
|
78
|
-
interface FunctionExpressionNameScope extends Scope {
|
|
79
|
-
}
|
|
80
|
-
declare const FunctionExpressionNameScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<FunctionExpressionNameScope>;
|
|
81
|
-
interface CatchScope extends Scope {
|
|
82
|
-
}
|
|
83
|
-
declare const CatchScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<CatchScope>;
|
|
84
|
-
interface WithScope extends Scope {
|
|
85
|
-
}
|
|
86
|
-
declare const WithScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<WithScope>;
|
|
87
|
-
interface BlockScope extends Scope {
|
|
88
|
-
}
|
|
89
|
-
declare const BlockScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<BlockScope>;
|
|
90
|
-
interface SwitchScope extends Scope {
|
|
91
|
-
}
|
|
92
|
-
declare const SwitchScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<SwitchScope>;
|
|
93
|
-
interface FunctionScope extends Scope {
|
|
94
|
-
}
|
|
95
|
-
declare const FunctionScope: ScopeConstructor & (new (scopeManager: ScopeManager, upperScope: Scope, block: TSESTree.Node | null, isMethodDefinition: boolean) => FunctionScope);
|
|
96
|
-
interface ForScope extends Scope {
|
|
97
|
-
}
|
|
98
|
-
declare const ForScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<ForScope>;
|
|
99
|
-
interface ClassScope extends Scope {
|
|
100
|
-
}
|
|
101
|
-
declare const ClassScope: ScopeConstructor & ScopeChildConstructorWithUpperScope<ClassScope>;
|
|
102
|
-
export { ScopeType, Scope, GlobalScope, ModuleScope, FunctionExpressionNameScope, CatchScope, WithScope, BlockScope, SwitchScope, FunctionScope, ForScope, ClassScope, };
|
|
103
|
-
//# sourceMappingURL=Scope.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Scope.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/Scope.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5D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