@typescript-eslint/utils 6.0.0-alpha.79 → 6.0.0-alpha.81

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.
Files changed (51) hide show
  1. package/_ts4.2/dist/ts-eslint-scope/Definition.d.ts +19 -0
  2. package/_ts4.2/dist/ts-eslint-scope/Options.d.ts +15 -0
  3. package/_ts4.2/dist/ts-eslint-scope/PatternVisitor.d.ts +25 -0
  4. package/_ts4.2/dist/ts-eslint-scope/Reference.d.ts +28 -0
  5. package/_ts4.2/dist/ts-eslint-scope/Referencer.d.ts +55 -0
  6. package/_ts4.2/dist/ts-eslint-scope/Scope.d.ts +103 -0
  7. package/_ts4.2/dist/ts-eslint-scope/ScopeManager.d.ts +50 -0
  8. package/_ts4.2/dist/ts-eslint-scope/Variable.d.ts +17 -0
  9. package/_ts4.2/dist/ts-eslint-scope/analyze.d.ts +16 -0
  10. package/_ts4.2/dist/ts-eslint-scope/index.d.ts +11 -0
  11. package/dist/ts-eslint-scope/Definition.d.ts +19 -0
  12. package/dist/ts-eslint-scope/Definition.d.ts.map +1 -0
  13. package/dist/ts-eslint-scope/Definition.js +9 -0
  14. package/dist/ts-eslint-scope/Definition.js.map +1 -0
  15. package/dist/ts-eslint-scope/Options.d.ts +15 -0
  16. package/dist/ts-eslint-scope/Options.d.ts.map +1 -0
  17. package/dist/ts-eslint-scope/Options.js +3 -0
  18. package/dist/ts-eslint-scope/Options.js.map +1 -0
  19. package/dist/ts-eslint-scope/PatternVisitor.d.ts +25 -0
  20. package/dist/ts-eslint-scope/PatternVisitor.d.ts.map +1 -0
  21. package/dist/ts-eslint-scope/PatternVisitor.js +10 -0
  22. package/dist/ts-eslint-scope/PatternVisitor.js.map +1 -0
  23. package/dist/ts-eslint-scope/Reference.d.ts +28 -0
  24. package/dist/ts-eslint-scope/Reference.d.ts.map +1 -0
  25. package/dist/ts-eslint-scope/Reference.js +10 -0
  26. package/dist/ts-eslint-scope/Reference.js.map +1 -0
  27. package/dist/ts-eslint-scope/Referencer.d.ts +55 -0
  28. package/dist/ts-eslint-scope/Referencer.d.ts.map +1 -0
  29. package/dist/ts-eslint-scope/Referencer.js +11 -0
  30. package/dist/ts-eslint-scope/Referencer.js.map +1 -0
  31. package/dist/ts-eslint-scope/Scope.d.ts +103 -0
  32. package/dist/ts-eslint-scope/Scope.d.ts.map +1 -0
  33. package/dist/ts-eslint-scope/Scope.js +28 -0
  34. package/dist/ts-eslint-scope/Scope.js.map +1 -0
  35. package/dist/ts-eslint-scope/ScopeManager.d.ts +50 -0
  36. package/dist/ts-eslint-scope/ScopeManager.d.ts.map +1 -0
  37. package/dist/ts-eslint-scope/ScopeManager.js +10 -0
  38. package/dist/ts-eslint-scope/ScopeManager.js.map +1 -0
  39. package/dist/ts-eslint-scope/Variable.d.ts +17 -0
  40. package/dist/ts-eslint-scope/Variable.d.ts.map +1 -0
  41. package/dist/ts-eslint-scope/Variable.js +10 -0
  42. package/dist/ts-eslint-scope/Variable.js.map +1 -0
  43. package/dist/ts-eslint-scope/analyze.d.ts +16 -0
  44. package/dist/ts-eslint-scope/analyze.d.ts.map +1 -0
  45. package/dist/ts-eslint-scope/analyze.js +7 -0
  46. package/dist/ts-eslint-scope/analyze.js.map +1 -0
  47. package/dist/ts-eslint-scope/index.d.ts +11 -0
  48. package/dist/ts-eslint-scope/index.d.ts.map +1 -0
  49. package/dist/ts-eslint-scope/index.js +29 -0
  50. package/dist/ts-eslint-scope/index.js.map +1 -0
  51. package/package.json +6 -6
@@ -0,0 +1,19 @@
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
@@ -0,0 +1,15 @@
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
@@ -0,0 +1,25 @@
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
@@ -0,0 +1,28 @@
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
@@ -0,0 +1,55 @@
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
@@ -0,0 +1,103 @@
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
@@ -0,0 +1,50 @@
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
@@ -0,0 +1,17 @@
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
@@ -0,0 +1,16 @@
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
@@ -0,0 +1,11 @@
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
@@ -0,0 +1,19 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,9 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,15 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Options.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/Options.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,28 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,55 @@
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
@@ -0,0 +1 @@
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,EAAE,OAAO,GAAG,OAAO,CAAC;IACrE,wBAAwB,CAAC,uBAAuB,EAAE,OAAO,GAAG,IAAI,CAAC;IAEjE,uBAAuB,CACrB,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,GAAG,EAChB,mBAAm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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"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,103 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scope.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/Scope.ts"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AI,sBACP,OAAO,KAC1B,aAAa,CACjB,CAAC;AAEF,UAAU,QAAS,SAAQ,KAAK;CAAG;AACnC,QAAA,MAAM,QAAQ,kEACiC,CAAC;AAEhD,UAAU,UAAW,SAAQ,KAAK;CAAG;AACrC,QAAA,MAAM,UAAU,oEACiC,CAAC;AAElD,OAAO,EACL,SAAS,EACT,KAAK,EACL,WAAW,EACX,WAAW,EACX,2BAA2B,EAC3B,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,aAAa,EACb,QAAQ,EACR,UAAU,GACX,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/no-empty-interface, @typescript-eslint/no-explicit-any */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ClassScope = exports.ForScope = exports.FunctionScope = exports.SwitchScope = exports.BlockScope = exports.WithScope = exports.CatchScope = exports.FunctionExpressionNameScope = exports.ModuleScope = exports.GlobalScope = exports.Scope = void 0;
5
+ const scope_1 = require("eslint-scope/lib/scope");
6
+ const Scope = scope_1.Scope;
7
+ exports.Scope = Scope;
8
+ const GlobalScope = scope_1.GlobalScope;
9
+ exports.GlobalScope = GlobalScope;
10
+ const ModuleScope = scope_1.ModuleScope;
11
+ exports.ModuleScope = ModuleScope;
12
+ const FunctionExpressionNameScope = scope_1.FunctionExpressionNameScope;
13
+ exports.FunctionExpressionNameScope = FunctionExpressionNameScope;
14
+ const CatchScope = scope_1.CatchScope;
15
+ exports.CatchScope = CatchScope;
16
+ const WithScope = scope_1.WithScope;
17
+ exports.WithScope = WithScope;
18
+ const BlockScope = scope_1.BlockScope;
19
+ exports.BlockScope = BlockScope;
20
+ const SwitchScope = scope_1.SwitchScope;
21
+ exports.SwitchScope = SwitchScope;
22
+ const FunctionScope = scope_1.FunctionScope;
23
+ exports.FunctionScope = FunctionScope;
24
+ const ForScope = scope_1.ForScope;
25
+ exports.ForScope = ForScope;
26
+ const ClassScope = scope_1.ClassScope;
27
+ exports.ClassScope = ClassScope;
28
+ //# sourceMappingURL=Scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scope.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/Scope.ts"],"names":[],"mappings":";AAAA,8FAA8F;;;AAE9F,kDAYgC;AA+GhC,MAAM,KAAK,GAAG,aAA+B,CAAC;AA4D5C,sBAAK;AAjDP,MAAM,WAAW,GAAG,mBAEnB,CAAC;AAgDA,kCAAW;AA7Cb,MAAM,WAAW,GAAG,mBAC8B,CAAC;AA6CjD,kCAAW;AA1Cb,MAAM,2BAA2B,GAC/B,mCACkE,CAAC;AAyCnE,kEAA2B;AAtC7B,MAAM,UAAU,GAAG,kBAC8B,CAAC;AAsChD,gCAAU;AAnCZ,MAAM,SAAS,GAAG,iBAC8B,CAAC;AAmC/C,8BAAS;AAhCX,MAAM,UAAU,GAAG,kBAC8B,CAAC;AAgChD,gCAAU;AA7BZ,MAAM,WAAW,GAAG,mBAC8B,CAAC;AA6BjD,kCAAW;AA1Bb,MAAM,aAAa,GAAG,qBAOrB,CAAC;AAoBA,sCAAa;AAjBf,MAAM,QAAQ,GAAG,gBAC8B,CAAC;AAiB9C,4BAAQ;AAdV,MAAM,UAAU,GAAG,kBAC8B,CAAC;AAchD,gCAAU"}
@@ -0,0 +1,50 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScopeManager.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/ScopeManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EA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AQ,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC;IAC5D,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,IAAI,CAAC;IAEf,WAAW,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IAC1C,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;IAC9C,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;IAC7C,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,GAAG,KAAK,CAAC;IAC7E,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;IAC3C,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;IAC7C,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;IAC5C,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;IAC7C,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;IAC9C,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;IAC9C,iCAAiC,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;IAE9D,OAAO,IAAI,OAAO,CAAC;CACpB;AACD,QAAA,MAAM,YAAY,gBACF,mBAAmB,KAAG,YACrC,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,10 @@
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.ScopeManager = void 0;
7
+ const scope_manager_1 = __importDefault(require("eslint-scope/lib/scope-manager"));
8
+ const ScopeManager = scope_manager_1.default;
9
+ exports.ScopeManager = ScopeManager;
10
+ //# sourceMappingURL=ScopeManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScopeManager.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/ScopeManager.ts"],"names":[],"mappings":";;;;;;AAAA,mFAAgE;AAyDhE,MAAM,YAAY,GAAG,uBAEpB,CAAC;AAEO,oCAAY"}
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Variable.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/Variable.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC;IACnC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,QAAA,MAAM,QAAQ,YACJ,QACT,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,10 @@
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.Variable = void 0;
7
+ const variable_1 = __importDefault(require("eslint-scope/lib/variable"));
8
+ const Variable = variable_1.default;
9
+ exports.Variable = Variable;
10
+ //# sourceMappingURL=Variable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Variable.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/Variable.ts"],"names":[],"mappings":";;;;;;AAAA,yEAAuD;AAkBvD,MAAM,QAAQ,GAAG,kBAEhB,CAAC;AAEO,4BAAQ"}
@@ -0,0 +1,16 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/analyze.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,UAAU,eAAe;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC,CAAC;IACxD,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACjC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AACD,QAAA,MAAM,OAAO,QACN,SAAS,IAAI,YACR,eAAe,KACtB,YAAY,CAAC;AAElB,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.analyze = void 0;
4
+ const eslint_scope_1 = require("eslint-scope");
5
+ const analyze = eslint_scope_1.analyze;
6
+ exports.analyze = analyze;
7
+ //# sourceMappingURL=analyze.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/analyze.ts"],"names":[],"mappings":";;;AAAA,+CAAwD;AAgBxD,MAAM,OAAO,GAAG,sBAGC,CAAC;AAET,0BAAO"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ts-eslint-scope/index.ts"],"names":[],"mappings":"AAEA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAE3B,eAAO,MAAM,OAAO,EAAE,MAAsB,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.version = void 0;
18
+ const eslint_scope_1 = require("eslint-scope");
19
+ __exportStar(require("./analyze"), exports);
20
+ __exportStar(require("./Definition"), exports);
21
+ __exportStar(require("./Options"), exports);
22
+ __exportStar(require("./PatternVisitor"), exports);
23
+ __exportStar(require("./Reference"), exports);
24
+ __exportStar(require("./Referencer"), exports);
25
+ __exportStar(require("./Scope"), exports);
26
+ __exportStar(require("./ScopeManager"), exports);
27
+ __exportStar(require("./Variable"), exports);
28
+ exports.version = eslint_scope_1.version;
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ts-eslint-scope/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAAwD;AAExD,4CAA0B;AAC1B,+CAA6B;AAC7B,4CAA0B;AAC1B,mDAAiC;AACjC,8CAA4B;AAC5B,+CAA6B;AAC7B,0CAAwB;AACxB,iDAA+B;AAC/B,6CAA2B;AAEd,QAAA,OAAO,GAAW,sBAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/utils",
3
- "version": "6.0.0-alpha.79+1d78576d4",
3
+ "version": "6.0.0-alpha.81+f0f45a9d3",
4
4
  "description": "Utilities for working with TypeScript + ESLint together",
5
5
  "files": [
6
6
  "dist",
@@ -67,9 +67,9 @@
67
67
  "dependencies": {
68
68
  "@types/json-schema": "^7.0.9",
69
69
  "@types/semver": "^7.3.12",
70
- "@typescript-eslint/scope-manager": "6.0.0-alpha.79+1d78576d4",
71
- "@typescript-eslint/types": "6.0.0-alpha.79+1d78576d4",
72
- "@typescript-eslint/typescript-estree": "6.0.0-alpha.79+1d78576d4",
70
+ "@typescript-eslint/scope-manager": "6.0.0-alpha.81+f0f45a9d3",
71
+ "@typescript-eslint/types": "6.0.0-alpha.81+f0f45a9d3",
72
+ "@typescript-eslint/typescript-estree": "6.0.0-alpha.81+f0f45a9d3",
73
73
  "eslint-scope": "^5.1.1",
74
74
  "eslint-utils": "^3.0.0",
75
75
  "semver": "^7.3.7"
@@ -78,7 +78,7 @@
78
78
  "eslint": "^7.0.0 || ^8.0.0"
79
79
  },
80
80
  "devDependencies": {
81
- "@typescript-eslint/parser": "6.0.0-alpha.79+1d78576d4",
81
+ "@typescript-eslint/parser": "6.0.0-alpha.81+f0f45a9d3",
82
82
  "typescript": "*"
83
83
  },
84
84
  "funding": {
@@ -92,5 +92,5 @@
92
92
  ]
93
93
  }
94
94
  },
95
- "gitHead": "1d78576d41323e35c2d2a2ecc92f6ee76ed61d57"
95
+ "gitHead": "f0f45a9d35453c3ec601df770092d236c72d447b"
96
96
  }