Skip to content

Commit 82a1cbf

Browse files
authored
🤖 Merge PR DefinitelyTyped#74308 [eslint-scope] correct scope type incompatibility by @michaelfaith
1 parent dfa3539 commit 82a1cbf

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

‎types/eslint-scope/eslint-scope-tests.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ if (scope) {
5858
scope.functionExpressionScope;
5959
// $ExpectType Reference[]
6060
scope.implicit.left;
61+
// $ExpectType Map<string, Variable<Reference>>
62+
scope.implicit.set;
63+
// $ExpectType Variable<Reference>[]
64+
scope.implicit.variables;
6165
// $ExpectType Map<string, Variable>
6266
scope.set;
6367
// $ExpectType Reference[]
@@ -196,7 +200,7 @@ scopeInstance.childScopes;
196200
scopeInstance.block;
197201
// $ExpectType boolean
198202
scopeInstance.functionExpressionScope;
199-
// $ExpectType { left: Reference[]; set: Map<string, Variable<Reference>>; }
203+
// $ExpectType { left: Reference[]; set: Map<string, Variable<Reference>>; variables: Variable<Reference>[]; }
200204
scopeInstance.implicit;
201205
// $ExpectType Map<string, Variable>
202206
scopeInstance.set;

‎types/eslint-scope/index.d.cts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export class Scope<TVariable extends Variable = Variable, TReference extends Ref
201201
/**
202202
* Implicit references (e.g., 'arguments' in functions).
203203
*/
204-
implicit: { left: TReference[]; set: Map<string, Variable> };
204+
implicit: { left: TReference[]; set: Map<string, Variable>; variables: Variable[] };
205205

206206
/**
207207
* Map of variable names to variables.

‎types/eslint-scope/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@types/eslint-scope",
4-
"version": "8.3.9999",
4+
"version": "8.4.9999",
55
"type": "module",
66
"projects": [
77
"https://github.com/eslint/eslint-scope"

0 commit comments

Comments
 (0)