@typescript-eslint/scope-manager 8.70.1-alpha.2 → 8.70.1-alpha.21
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.
|
@@ -29,11 +29,22 @@ class Referencer extends Visitor_1.Visitor {
|
|
|
29
29
|
}
|
|
30
30
|
populateGlobalsFromLib(globalScope) {
|
|
31
31
|
const libs = this.resolveLibDefinitions();
|
|
32
|
+
const variables = new Map();
|
|
32
33
|
for (const lib of libs) {
|
|
33
34
|
for (const [name, variable] of lib.variables) {
|
|
34
|
-
|
|
35
|
+
const existing = variables.get(name);
|
|
36
|
+
variables.set(name, existing
|
|
37
|
+
? {
|
|
38
|
+
...existing,
|
|
39
|
+
isTypeVariable: existing.isTypeVariable || variable.isTypeVariable,
|
|
40
|
+
isValueVariable: existing.isValueVariable || variable.isValueVariable,
|
|
41
|
+
}
|
|
42
|
+
: variable);
|
|
35
43
|
}
|
|
36
44
|
}
|
|
45
|
+
for (const [name, variable] of variables) {
|
|
46
|
+
globalScope.defineImplicitVariable(name, variable);
|
|
47
|
+
}
|
|
37
48
|
// Special implicit global for const assertions (`{} as const`, `<const>{}`)
|
|
38
49
|
globalScope.defineImplicitVariable('const', {
|
|
39
50
|
eslintImplicitGlobalSetting: 'readonly',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/scope-manager",
|
|
3
|
-
"version": "8.70.1-alpha.
|
|
3
|
+
"version": "8.70.1-alpha.21",
|
|
4
4
|
"description": "TypeScript scope analyser for ESLint",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"estree"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@typescript-eslint/types": "8.70.1-alpha.
|
|
39
|
-
"@typescript-eslint/visitor-keys": "8.70.1-alpha.
|
|
38
|
+
"@typescript-eslint/types": "8.70.1-alpha.21",
|
|
39
|
+
"@typescript-eslint/visitor-keys": "8.70.1-alpha.21"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@typescript-eslint/typescript-estree": "8.70.1-alpha.
|
|
42
|
+
"@typescript-eslint/typescript-estree": "8.70.1-alpha.21",
|
|
43
43
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
44
44
|
"@vitest/coverage-v8": "^4.0.18",
|
|
45
45
|
"@vitest/pretty-format": "^4.0.18",
|