diff --git a/crates/oxc_semantic/src/builder.rs b/crates/oxc_semantic/src/builder.rs index 28b6857e5bc17..005e6543d3114 100644 --- a/crates/oxc_semantic/src/builder.rs +++ b/crates/oxc_semantic/src/builder.rs @@ -2492,7 +2492,7 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> { impl<'a> SemanticBuilder<'a> { fn reference_identifier(&mut self, ident: &IdentifierReference<'a>) { let flags = self.resolve_reference_usages(); - let reference = Reference::new(self.current_node_id, flags); + let reference = Reference::new(self.current_node_id, self.current_scope_id, flags); let reference_id = self.declare_reference(ident.name, reference); ident.reference_id.set(Some(reference_id)); } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/array.snap b/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/array.snap index 2916d02dadbab..1f8af68673829 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/array.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/array.snap @@ -19,13 +19,15 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/assignments/array.js "flags": "ReferenceFlags(Read)", "id": 1, "name": "read", - "node_id": 13 + "node_id": 13, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 3, "name": "read", - "node_id": 17 + "node_id": 17, + "scope_id": 0 } ] }, @@ -39,13 +41,15 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/assignments/array.js "flags": "ReferenceFlags(Write)", "id": 0, "name": "write", - "node_id": 12 + "node_id": 12, + "scope_id": 0 }, { "flags": "ReferenceFlags(Write)", "id": 2, "name": "write", - "node_id": 16 + "node_id": 16, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/nested-assignment.snap b/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/nested-assignment.snap index 5b07cc369fab2..65f86a5f1d6ef 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/nested-assignment.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/nested-assignment.snap @@ -19,25 +19,29 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/assignments/nested-assignm "flags": "ReferenceFlags(Write)", "id": 0, "name": "y", - "node_id": 9 + "node_id": 9, + "scope_id": 0 }, { "flags": "ReferenceFlags(Write)", "id": 1, "name": "y", - "node_id": 19 + "node_id": 19, + "scope_id": 0 }, { "flags": "ReferenceFlags(Write)", "id": 2, "name": "y", - "node_id": 30 + "node_id": 30, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 4, "name": "y", - "node_id": 37 + "node_id": 37, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/object.snap b/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/object.snap index de618dd099610..fc500f5d55e6b 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/object.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/object.snap @@ -19,19 +19,22 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/assignments/object.js "flags": "ReferenceFlags(Read)", "id": 1, "name": "read", - "node_id": 14 + "node_id": 14, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 5, "name": "read", - "node_id": 26 + "node_id": 26, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 6, "name": "read", - "node_id": 27 + "node_id": 27, + "scope_id": 0 } ] }, @@ -45,13 +48,15 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/assignments/object.js "flags": "ReferenceFlags(Write)", "id": 2, "name": "write", - "node_id": 17 + "node_id": 17, + "scope_id": 0 }, { "flags": "ReferenceFlags(Write)", "id": 3, "name": "write", - "node_id": 23 + "node_id": 23, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/read-write-operators.snap b/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/read-write-operators.snap index 39668ce24a25b..6e8a14f5339b9 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/read-write-operators.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/read-write-operators.snap @@ -19,97 +19,113 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/assignments/read-write-ope "flags": "ReferenceFlags(Write)", "id": 0, "name": "Foo", - "node_id": 7 + "node_id": 7, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 1, "name": "Foo", - "node_id": 11 + "node_id": 11, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 2, "name": "Foo", - "node_id": 15 + "node_id": 15, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 3, "name": "Foo", - "node_id": 19 + "node_id": 19, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 4, "name": "Foo", - "node_id": 23 + "node_id": 23, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 5, "name": "Foo", - "node_id": 27 + "node_id": 27, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 6, "name": "Foo", - "node_id": 31 + "node_id": 31, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 7, "name": "Foo", - "node_id": 35 + "node_id": 35, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 8, "name": "Foo", - "node_id": 39 + "node_id": 39, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 9, "name": "Foo", - "node_id": 43 + "node_id": 43, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 10, "name": "Foo", - "node_id": 47 + "node_id": 47, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 11, "name": "Foo", - "node_id": 51 + "node_id": 51, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 12, "name": "Foo", - "node_id": 55 + "node_id": 55, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 13, "name": "Foo", - "node_id": 59 + "node_id": 59, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 14, "name": "Foo", - "node_id": 63 + "node_id": 63, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 15, "name": "Foo", - "node_id": 67 + "node_id": 67, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/update-expression.snap b/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/update-expression.snap index b1c0e7c3307f1..449510bc17c90 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/update-expression.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/js/assignments/update-expression.snap @@ -19,25 +19,29 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/assignments/update-express "flags": "ReferenceFlags(Read | Write)", "id": 0, "name": "num", - "node_id": 7 + "node_id": 7, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 1, "name": "num", - "node_id": 10 + "node_id": 10, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 2, "name": "num", - "node_id": 13 + "node_id": 13, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read | Write)", "id": 3, "name": "num", - "node_id": 16 + "node_id": 16, + "scope_id": 0 } ] }, @@ -51,25 +55,29 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/assignments/update-express "flags": "ReferenceFlags(Read)", "id": 4, "name": "obj", - "node_id": 27 + "node_id": 27, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 5, "name": "obj", - "node_id": 32 + "node_id": 32, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 6, "name": "obj", - "node_id": 37 + "node_id": 37, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 7, "name": "obj", - "node_id": 42 + "node_id": 42, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/parameters.snap b/crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/parameters.snap index 3ff5a2d3f6c50..7ce4515312c68 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/parameters.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/parameters.snap @@ -30,7 +30,8 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/parameters.js "flags": "ReferenceFlags(Read)", "id": 1, "name": "a", - "node_id": 22 + "node_id": 22, + "scope_id": 2 } ] }, @@ -78,7 +79,8 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/parameters.js "flags": "ReferenceFlags(Read)", "id": 0, "name": "A", - "node_id": 17 + "node_id": 17, + "scope_id": 2 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/with-same-name-var.snap b/crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/with-same-name-var.snap index b2ed29964866b..2aedf7464ed01 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/with-same-name-var.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/with-same-name-var.snap @@ -50,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/js/try-catch/with-same-name-v "flags": "ReferenceFlags(Read)", "id": 1, "name": "a", - "node_id": 22 + "node_id": 22, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/jsx/element-name.snap b/crates/oxc_semantic/tests/fixtures/oxc/jsx/element-name.snap index fb2842291fc01..951ce1a278a85 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/jsx/element-name.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/jsx/element-name.snap @@ -27,13 +27,15 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/jsx/element-name.jsx "flags": "ReferenceFlags(Read)", "id": 0, "name": "Component", - "node_id": 16 + "node_id": 16, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "Component", - "node_id": 18 + "node_id": 18, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/jsx/member-expression.snap b/crates/oxc_semantic/tests/fixtures/oxc/jsx/member-expression.snap index 9b4be45eae487..648419f727785 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/jsx/member-expression.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/jsx/member-expression.snap @@ -19,13 +19,15 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/jsx/member-expression.jsx "flags": "ReferenceFlags(Read)", "id": 0, "name": "A", - "node_id": 10 + "node_id": 10, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "A", - "node_id": 16 + "node_id": 16, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/ts/assignments/left-hand.snap b/crates/oxc_semantic/tests/fixtures/oxc/ts/assignments/left-hand.snap index 0ec0c469051b1..ca5ca4a1fb065 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/ts/assignments/left-hand.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/ts/assignments/left-hand.snap @@ -19,49 +19,57 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/assignments/left-hand.ts "flags": "ReferenceFlags(Read | Write)", "id": 0, "name": "Foo", - "node_id": 10 + "node_id": 10, + "scope_id": 0 }, { "flags": "ReferenceFlags(Write)", "id": 1, "name": "Foo", - "node_id": 16 + "node_id": 16, + "scope_id": 0 }, { "flags": "ReferenceFlags(Write)", "id": 2, "name": "Foo", - "node_id": 21 + "node_id": 21, + "scope_id": 0 }, { "flags": "ReferenceFlags(Write)", "id": 3, "name": "Foo", - "node_id": 27 + "node_id": 27, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 4, "name": "Foo", - "node_id": 34 + "node_id": 34, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 5, "name": "Foo", - "node_id": 42 + "node_id": 42, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 6, "name": "Foo", - "node_id": 49 + "node_id": 49, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 7, "name": "Foo", - "node_id": 57 + "node_id": 57, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/default/type-alias.snap b/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/default/type-alias.snap index a154f88ad55f4..8fd04414f2b04 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/default/type-alias.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/default/type-alias.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/exports/default/type-alias "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 5 + "node_id": 5, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/interface-heritage.snap b/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/interface-heritage.snap index e2c5c6d9865d4..721be34a0e21e 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/interface-heritage.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/interface-heritage.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/interface-he "flags": "ReferenceFlags(Read)", "id": 1, "name": "forwardRef", - "node_id": 17 + "node_id": 17, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/type-and-non-type.snap b/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/type-and-non-type.snap index 1e4c523154534..a2c60105bf029 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/type-and-non-type.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/type-and-non-type.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/type-and-non "flags": "ReferenceFlags(Read)", "id": 1, "name": "ToastViewport", - "node_id": 13 + "node_id": 13, + "scope_id": 0 } ] }, @@ -41,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/exports/named/type-and-non "flags": "ReferenceFlags(Type)", "id": 0, "name": "ToastProps", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/oxc/ts/functions/return-type.snap b/crates/oxc_semantic/tests/fixtures/oxc/ts/functions/return-type.snap index 7df89b012c888..3914a5ee61bb9 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/ts/functions/return-type.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/ts/functions/return-type.snap @@ -73,13 +73,15 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/functions/return-type.ts "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 10 + "node_id": 10, + "scope_id": 2 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 24 + "node_id": 24, + "scope_id": 4 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/oxc/ts/interfaces/property-with-type-import.snap b/crates/oxc_semantic/tests/fixtures/oxc/ts/interfaces/property-with-type-import.snap index e74af5f15ed39..217e8061d297c 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/ts/interfaces/property-with-type-import.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/ts/interfaces/property-with-type-import.snap @@ -41,13 +41,15 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/interfaces/property-with-t "flags": "ReferenceFlags(Type)", "id": 0, "name": "X", - "node_id": 13 + "node_id": 13, + "scope_id": 2 }, { "flags": "ReferenceFlags(Type)", "id": 2, "name": "X", - "node_id": 23 + "node_id": 23, + "scope_id": 3 } ] }, @@ -61,13 +63,15 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/interfaces/property-with-t "flags": "ReferenceFlags(Type)", "id": 1, "name": "B", - "node_id": 16 + "node_id": 16, + "scope_id": 2 }, { "flags": "ReferenceFlags(Type)", "id": 3, "name": "B", - "node_id": 27 + "node_id": 27, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/oxc/ts/issue-7879.snap b/crates/oxc_semantic/tests/fixtures/oxc/ts/issue-7879.snap index 0a0ce373abee9..f4ef169080c8a 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/ts/issue-7879.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/ts/issue-7879.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/issue-7879.ts "flags": "ReferenceFlags(Read)", "id": 0, "name": "Bar", - "node_id": 14 + "node_id": 14, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/oxc/ts/namespaces/value-module.snap b/crates/oxc_semantic/tests/fixtures/oxc/ts/namespaces/value-module.snap index 112ccdf4dd765..88209a585801b 100644 --- a/crates/oxc_semantic/tests/fixtures/oxc/ts/namespaces/value-module.snap +++ b/crates/oxc_semantic/tests/fixtures/oxc/ts/namespaces/value-module.snap @@ -57,13 +57,15 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/namespaces/value-module.ts "flags": "ReferenceFlags(Type)", "id": 0, "name": "N1", - "node_id": 18 + "node_id": 18, + "scope_id": 3 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "N1", - "node_id": 24 + "node_id": 24, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/block/inherited-scope.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/block/inherited-scope.snap index 100d11693ac07..18f2d6cbb27ab 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/block/inherited-scope.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/block/inherited-scope.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/block/inherited "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 7 + "node_id": 7, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/block/scope.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/block/scope.snap index edce0fc7af22e..2036652106472 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/block/scope.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/block/scope.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/block/scope.ts "flags": "ReferenceFlags(Read)", "id": 0, "name": "i", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression/call-expression.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression/call-expression.snap index 07b9ba8dbb959..e040e3c0faa7b 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression/call-expression.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression/call-expression.snap @@ -27,13 +27,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression "flags": "ReferenceFlags(Read)", "id": 0, "name": "foo", - "node_id": 13 + "node_id": 13, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 2, "name": "foo", - "node_id": 18 + "node_id": 18, + "scope_id": 0 } ] }, @@ -47,13 +49,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression "flags": "ReferenceFlags(Read)", "id": 1, "name": "a", - "node_id": 14 + "node_id": 14, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 3, "name": "a", - "node_id": 19 + "node_id": 19, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression/type-parameters1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression/type-parameters1.snap index f9f2a92667532..7a23e9784d006 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression/type-parameters1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression/type-parameters1.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/inherited-scope.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/inherited-scope.snap index b615ccc8e9214..bd5ae92ec82fe 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/inherited-scope.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/inherited-scope.snap @@ -50,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/inherited "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 12 + "node_id": 12, + "scope_id": 3 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/scope.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/scope.snap index 0ce7ddddd8fdd..7cf0aa84a8b1c 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/scope.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/scope.snap @@ -30,7 +30,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/scope.ts "flags": "ReferenceFlags(Read)", "id": 0, "name": "e", - "node_id": 8 + "node_id": 8, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/abstract-accessor-property.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/abstract-accessor-property.snap index d11672de961b0..5b3b689567fff 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/abstract-accessor-property.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/abstract-accessor-property.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/abstract-property.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/abstract-property.snap index 1d9b36f8e644a..c32cfea32432d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/abstract-property.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/abstract-property.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/accessor-property-type-annotation.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/accessor-property-type-annotation.snap index 466ae9208d0ec..d42572a0907f1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/accessor-property-type-annotation.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/accessor-property-type-annotation.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/accessor-property.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/accessor-property.snap index 1023189add458..a3863e99e1760 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/accessor-property.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/accessor-property.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "x", - "node_id": 13 + "node_id": 13, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/computed-member.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/computed-member.snap index e45447f689b1c..bf3a5600316f3 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/computed-member.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/computed-member.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "outer1", - "node_id": 13 + "node_id": 13, + "scope_id": 1 } ] }, @@ -49,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 1, "name": "outer2", - "node_id": 16 + "node_id": 16, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/extends-generic.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/extends-generic.snap index 6729f6c340c1f..ec9cd83c36ec0 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/extends-generic.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/extends-generic.snap @@ -49,7 +49,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "A", - "node_id": 12 + "node_id": 12, + "scope_id": 3 } ] }, @@ -63,7 +64,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 15 + "node_id": 15, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/extends.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/extends.snap index 0828e378eb327..a3568056af445 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/extends.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/extends.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "A", - "node_id": 6 + "node_id": 6, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/generic-ref-extends.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/generic-ref-extends.snap index e045c59805a06..22af12669e434 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/generic-ref-extends.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/generic-ref-extends.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 1, "name": "A", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/generic-ref-implements.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/generic-ref-implements.snap index a3626647e2c5a..6f3c4bb5ed124 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/generic-ref-implements.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/generic-ref-implements.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 1, "name": "A", - "node_id": 10 + "node_id": 10, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/implements-generic.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/implements-generic.snap index 24f567f6d0961..3597d183875fa 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/implements-generic.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/implements-generic.snap @@ -49,7 +49,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 13 + "node_id": 13, + "scope_id": 3 } ] }, @@ -63,7 +64,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 16 + "node_id": 16, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/implements.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/implements.snap index 53a3802e5ac56..618852e85aaee 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/implements.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/implements.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 7 + "node_id": 7, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/index-signature.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/index-signature.snap index 8414253104ba1..1e5d997546992 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/index-signature.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/index-signature.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 0, "name": "Bar", - "node_id": 17 + "node_id": 17, + "scope_id": 2 } ] }, @@ -48,7 +49,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 1, "name": "Foo", - "node_id": 26 + "node_id": 26, + "scope_id": 2 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/method-param-default.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/method-param-default.snap index 167a6f7203a7d..c2995a33bf687 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/method-param-default.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/method-param-default.snap @@ -23,7 +23,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "printName", - "node_id": 16 + "node_id": 16, + "scope_id": 2 } ] } @@ -45,7 +46,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 1, "name": "printerName", - "node_id": 34 + "node_id": 34, + "scope_id": 3 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/method.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/method.snap index e8c41f8266ae5..74c5d5ff2abe5 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/method.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/method.snap @@ -23,13 +23,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 23 + "node_id": 23, + "scope_id": 2 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "a", - "node_id": 28 + "node_id": 28, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/new.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/new.snap index 89986ddaae605..5bf4e79af4956 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/new.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/new.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "A", - "node_id": 6 + "node_id": 6, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/parameter-properties.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/parameter-properties.snap index 62237bb661f4b..ae622ef7b841d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/parameter-properties.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/parameter-properties.snap @@ -30,13 +30,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 23 + "node_id": 23, + "scope_id": 3 }, { "flags": "ReferenceFlags(Read)", "id": 3, "name": "a", - "node_id": 36 + "node_id": 36, + "scope_id": 3 } ] }, @@ -98,7 +100,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 1, "name": "outer", - "node_id": 26 + "node_id": 26, + "scope_id": 3 } ] }, @@ -112,7 +115,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 2, "name": "Outer", - "node_id": 33 + "node_id": 33, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/properties-type-annotation.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/properties-type-annotation.snap index d249d4e8bf88e..96ce26e497051 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/properties-type-annotation.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/properties-type-annotation.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/properties.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/properties.snap index 20e2bd87bed61..f6c0a1471b36f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/properties.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/properties.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "x", - "node_id": 13 + "node_id": 13, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/static-external-ref.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/static-external-ref.snap index d26cbfa869b66..094c1cec61317 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/static-external-ref.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/static-external-ref.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "f", - "node_id": 11 + "node_id": 11, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/static-with-constructor.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/static-with-constructor.snap index 48a540f368929..547b883e708da 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/static-with-constructor.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/static-with-constructor.snap @@ -49,7 +49,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Read)", "id": 0, "name": "f", - "node_id": 16 + "node_id": 16, + "scope_id": 4 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/type-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/type-reference.snap index c1417706e794e..7b1f2ec56e3c1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/type-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declaration/type-reference.snap @@ -41,19 +41,22 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 7 + "node_id": 7, + "scope_id": 2 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "A", - "node_id": 11 + "node_id": 11, + "scope_id": 3 }, { "flags": "ReferenceFlags(Read)", "id": 2, "name": "A", - "node_id": 15 + "node_id": 15, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/computed-member.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/computed-member.snap index 808127fa3c683..b46e0cb91b172 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/computed-member.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/computed-member.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expressio "flags": "ReferenceFlags(Read)", "id": 0, "name": "outer1", - "node_id": 15 + "node_id": 15, + "scope_id": 1 } ] }, @@ -49,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expressio "flags": "ReferenceFlags(Read)", "id": 1, "name": "outer2", - "node_id": 18 + "node_id": 18, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/extends.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/extends.snap index ed4e8aea43e52..06f6f31d33211 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/extends.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/extends.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expressio "flags": "ReferenceFlags(Read)", "id": 0, "name": "A", - "node_id": 8 + "node_id": 8, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/method.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/method.snap index 228678ec7e637..dc5b4c08eb2c6 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/method.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/method.snap @@ -23,13 +23,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expressio "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 25 + "node_id": 25, + "scope_id": 2 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "a", - "node_id": 30 + "node_id": 30, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/new.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/new.snap index a0d8bcd1775ac..d8fddbb73f3af 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/new.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/new.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expressio "flags": "ReferenceFlags(Read)", "id": 0, "name": "A", - "node_id": 8 + "node_id": 8, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/parameter-properties.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/parameter-properties.snap index a93570be4e697..4b11b1af0d38d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/parameter-properties.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/parameter-properties.snap @@ -30,13 +30,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expressio "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 25 + "node_id": 25, + "scope_id": 3 }, { "flags": "ReferenceFlags(Read)", "id": 3, "name": "a", - "node_id": 38 + "node_id": 38, + "scope_id": 3 } ] }, @@ -98,7 +100,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expressio "flags": "ReferenceFlags(Read)", "id": 1, "name": "outer", - "node_id": 28 + "node_id": 28, + "scope_id": 3 } ] }, @@ -112,7 +115,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expressio "flags": "ReferenceFlags(Type)", "id": 2, "name": "Outer", - "node_id": 35 + "node_id": 35, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/properties.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/properties.snap index ce0f4cab1fd28..89a69121d5c9b 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/properties.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/properties.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expressio "flags": "ReferenceFlags(Read)", "id": 0, "name": "x", - "node_id": 15 + "node_id": 15, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/self-reference-super.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/self-reference-super.snap index 995b831e70180..689a858f68199 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/self-reference-super.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expression/self-reference-super.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/expressio "flags": "ReferenceFlags(Read)", "id": 0, "name": "A", - "node_id": 6 + "node_id": 6, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/accessor.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/accessor.snap index 357fb6ab91f00..f077b993c88df 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/accessor.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/accessor.snap @@ -57,13 +57,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/acce "flags": "ReferenceFlags(Read)", "id": 0, "name": "decorator", - "node_id": 10 + "node_id": 10, + "scope_id": 2 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "decorator", - "node_id": 19 + "node_id": 19, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class-deco-with-object-param.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class-deco-with-object-param.snap index b9b8f9fd99d59..45ad3f0da3379 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class-deco-with-object-param.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class-deco-with-object-param.snap @@ -58,7 +58,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/clas "flags": "ReferenceFlags(Read)", "id": 0, "name": "deco", - "node_id": 22 + "node_id": 22, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class-property.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class-property.snap index 999363d160b69..9824e2cac98f4 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class-property.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class-property.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/clas "flags": "ReferenceFlags(Read)", "id": 0, "name": "decorator", - "node_id": 10 + "node_id": 10, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class.snap index 0114eb399123a..146eba6a535ae 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/class.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/clas "flags": "ReferenceFlags(Read)", "id": 0, "name": "decorator", - "node_id": 7 + "node_id": 7, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/method.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/method.snap index e7067da4b7b13..8583b653ef1d1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/method.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/method.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/meth "flags": "ReferenceFlags(Read)", "id": 0, "name": "decorator", - "node_id": 10 + "node_id": 10, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/parameter-property.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/parameter-property.snap index da839077705f1..0ad0c007d77b7 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/parameter-property.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/parameter-property.snap @@ -57,13 +57,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/para "flags": "ReferenceFlags(Read)", "id": 0, "name": "decorator", - "node_id": 14 + "node_id": 14, + "scope_id": 3 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "decorator", - "node_id": 18 + "node_id": 18, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/parameter.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/parameter.snap index 4e940ab2041c0..0534eb2c271f0 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/parameter.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/parameter.snap @@ -71,25 +71,29 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/para "flags": "ReferenceFlags(Read)", "id": 0, "name": "decorator", - "node_id": 14 + "node_id": 14, + "scope_id": 3 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "decorator", - "node_id": 18 + "node_id": 18, + "scope_id": 3 }, { "flags": "ReferenceFlags(Read)", "id": 2, "name": "decorator", - "node_id": 23 + "node_id": 23, + "scope_id": 3 }, { "flags": "ReferenceFlags(Read)", "id": 3, "name": "decorator", - "node_id": 30 + "node_id": 30, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/typeof-this.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/typeof-this.snap index 3c71d804e89fd..e885065c4ccbd 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/typeof-this.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/typeof-this.snap @@ -50,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/type "flags": "ReferenceFlags(Read)", "id": 0, "name": "decorator", - "node_id": 7 + "node_id": 7, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/array-assignment.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/array-assignment.snap index e53084aeb89ba..3e7f217367c9b 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/array-assignment.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/array-assignment.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/a "flags": "ReferenceFlags(Read)", "id": 0, "name": "obj", - "node_id": 14 + "node_id": 14, + "scope_id": 0 } ] }, @@ -33,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/a "flags": "ReferenceFlags(Write)", "id": 1, "name": "b", - "node_id": 16 + "node_id": 16, + "scope_id": 0 } ] }, @@ -47,7 +49,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/a "flags": "ReferenceFlags(Write)", "id": 2, "name": "c", - "node_id": 18 + "node_id": 18, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/object-assignment.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/object-assignment.snap index f453aa84bb56f..d4a984dfa2c36 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/object-assignment.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/object-assignment.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/destructuring/o "flags": "ReferenceFlags(Read)", "id": 2, "name": "obj", - "node_id": 20 + "node_id": 20, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default-type.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default-type.snap index 99b477058d148..ee516d4e02663 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default-type.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default-type.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default- "flags": "ReferenceFlags(Read)", "id": 0, "name": "T", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default2.snap index 688f062b8da30..d3bc0e3c82be5 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default2.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default2 "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 6 + "node_id": 6, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals1.snap index 705b5e95d276e..5c50364b7db3e 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals1.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals1. "flags": "ReferenceFlags(Read)", "id": 0, "name": "x", - "node_id": 6 + "node_id": 6, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals3-type.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals3-type.snap index a6597e66e0b0d..2849b2ee99746 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals3-type.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals3-type.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals3- "flags": "ReferenceFlags(Type)", "id": 0, "name": "Foo", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals4-type.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals4-type.snap index d0da6203cf0a2..69030c0135dfe 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals4-type.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals4-type.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals4- "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named-dual.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named-dual.snap index bf724533fb8be..630d6ec02cf0b 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named-dual.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named-dual.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named-du "flags": "ReferenceFlags(Read)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named2-type.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named2-type.snap index e093355750227..0827033d84244 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named2-type.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named2-type.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named2-t "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 7 + "node_id": 7, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named2.snap index 513769fa65559..298bcdb2da564 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named2.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named2.t "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 7 + "node_id": 7, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named3-type.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named3-type.snap index 1dccb8991f8cf..179252cac3f28 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named3-type.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named3-type.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named3-t "flags": "ReferenceFlags(Type)", "id": 0, "name": "V", - "node_id": 7 + "node_id": 7, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named3.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named3.snap index 2d6a072db98ab..a98facc3ac74c 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named3.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named3.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/named3.t "flags": "ReferenceFlags(Read)", "id": 0, "name": "v", - "node_id": 7 + "node_id": 7, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/type-inline.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/type-inline.snap index a481c744720ad..17f3b4f07a5e4 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/type-inline.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/type-inline.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/type-inl "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/type.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/type.snap index 40044b6da7fe4..aa22368302254 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/type.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/export/type.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/type.ts "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-body-shadow.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-body-shadow.snap index 8bc87405a5b54..dd3cfcd4b4226 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-body-shadow.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-body-shadow.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-const.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-const.snap index 0dc03c0039dad..0668f38e5353d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-const.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-const.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 12 + "node_id": 12, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-let.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-let.snap index f2577ca05fa86..4a20470e570c4 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-let.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-let.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-nested-body-shadow.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-nested-body-shadow.snap index ac0e4570e09f5..310db76e72785 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-nested-body-shadow.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-nested-body-shadow.snap @@ -50,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 15 + "node_id": 15, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-nested.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-nested.snap index 6a8bf1df3b52a..0824c913b703d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-nested.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-nested.snap @@ -43,7 +43,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 15 + "node_id": 15, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-param-shadow.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-param-shadow.snap index cb25c0e7f0072..6349009c68c11 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-param-shadow.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-param-shadow.snap @@ -28,7 +28,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-partial.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-partial.snap index 2e134b117de9b..fafea956c8cc6 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-partial.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/default-params/readable-ref-partial.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 12 + "node_id": 12, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/inherited-scope.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/inherited-scope.snap index 8b053b577f1be..6c4ee9c61eba4 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/inherited-scope.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/inherited-scope.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "parentScoped", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/no-body.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/no-body.snap index b10883851a084..e05d127bfaff1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/no-body.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/no-body.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 8 + "node_id": 8, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/params.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/params.snap index e5b0dddd26ef3..608df3e471b25 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/params.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/params.snap @@ -21,13 +21,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 23 + "node_id": 23, + "scope_id": 1 }, { "flags": "ReferenceFlags(Read)", "id": 2, "name": "a", - "node_id": 31 + "node_id": 31, + "scope_id": 1 } ] }, @@ -90,7 +92,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 1, "name": "outer", - "node_id": 26 + "node_id": 26, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/scope.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/scope.snap index 1c61110c6d928..597ec7b18d6fb 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/scope.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/scope.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "i", - "node_id": 16 + "node_id": 16, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/body-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/body-reference.snap index 9051ecd7ed172..ffbefa1318b08 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/body-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/body-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 15 + "node_id": 15, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/param-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/param-reference.snap index f9a81cf0c35bd..176ee7269dd91 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/param-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/param-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 13 + "node_id": 13, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/return-value-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/return-value-reference.snap index 3d2e3d12c9233..1f8278bb87c23 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/return-value-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/return-value-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/type-param-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/type-param-reference.snap index 79bddb443b3ae..2ffde2fcf5a29 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/type-param-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-parameters/type-param-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate-asserts2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate-asserts2.snap index faaa2e1a139ea..a7d737645cfe3 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate-asserts2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate-asserts2.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 18 + "node_id": 18, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate1.snap index 959f2a97f51a2..6488de1bf0abf 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate1.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 0, "name": "arg", - "node_id": 19 + "node_id": 19, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate2.snap index 45d9f8d3e9011..8f1564bb198f7 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow/type-predicate2.snap @@ -28,7 +28,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Read)", "id": 1, "name": "arg", - "node_id": 23 + "node_id": 23, + "scope_id": 2 } ] } @@ -49,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/arrow "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 18 + "node_id": 18, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-body-shadow.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-body-shadow.snap index 0a60184861691..0bdad7e4cbdf2 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-body-shadow.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-body-shadow.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-const.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-const.snap index f63c80b809486..d7a5963c64ab3 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-const.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-const.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 10 + "node_id": 10, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-let.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-let.snap index 78799a95d1fbc..82d477cc0273c 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-let.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-let.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-nested-body-shadow.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-nested-body-shadow.snap index 53138630facd1..188f96b71cff4 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-nested-body-shadow.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-nested-body-shadow.snap @@ -50,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 13 + "node_id": 13, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-nested.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-nested.snap index d03cb5ff8b38e..25ecde091a1b7 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-nested.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-nested.snap @@ -43,7 +43,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 13 + "node_id": 13, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-param-shadow.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-param-shadow.snap index 634f043976982..ed30e2702faf8 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-param-shadow.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-param-shadow.snap @@ -28,7 +28,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-partial.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-partial.snap index a45ef5bdd9f80..3ddc0db7cac7a 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-partial.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/default-params/readable-ref-partial.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 10 + "node_id": 10, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/inherited-scope.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/inherited-scope.snap index 076fea88bd0c3..cb48c6fbd738f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/inherited-scope.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/inherited-scope.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "parentScoped", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/name-shadowed-in-body.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/name-shadowed-in-body.snap index 3c013351885f3..b34a6f12e14e9 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/name-shadowed-in-body.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/name-shadowed-in-body.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 12 + "node_id": 12, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/overload.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/overload.snap index 69198440bd954..9593a5650dc30 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/overload.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/overload.snap @@ -43,7 +43,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 17 + "node_id": 17, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/params.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/params.snap index 6ced77bab13f3..f997c0245bbe2 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/params.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/params.snap @@ -21,13 +21,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 23 + "node_id": 23, + "scope_id": 1 }, { "flags": "ReferenceFlags(Read)", "id": 2, "name": "a", - "node_id": 31 + "node_id": 31, + "scope_id": 1 } ] }, @@ -90,7 +92,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 1, "name": "outer", - "node_id": 26 + "node_id": 26, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/scope.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/scope.snap index 88c9c04c1a6f6..aed169b6c9528 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/scope.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/scope.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "i", - "node_id": 14 + "node_id": 14, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/body-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/body-reference.snap index 0a17079c8fc6c..d498fc8464fce 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/body-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/body-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 13 + "node_id": 13, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/param-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/param-reference.snap index dcb4963e43997..79af1bc2576ca 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/param-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/param-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/return-value-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/return-value-reference.snap index bcb59026c5df2..490a0dcbb6fb9 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/return-value-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/return-value-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/type-param-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/type-param-reference.snap index d46c321065c08..bfca0171b8368 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/type-param-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-parameters/type-param-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate-asserts2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate-asserts2.snap index f913bb7e73604..9af67d9d9bdd0 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate-asserts2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate-asserts2.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 16 + "node_id": 16, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate1.snap index 462a966076066..28e9cd8f5f73c 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate1.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "arg", - "node_id": 17 + "node_id": 17, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate2.snap index 07c50d9938d9f..2a9222de34d4d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-declaration/type-predicate2.snap @@ -28,7 +28,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 1, "name": "arg", - "node_id": 21 + "node_id": 21, + "scope_id": 2 } ] } @@ -49,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 16 + "node_id": 16, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-body-shadow.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-body-shadow.snap index 69d16ca798c51..43672a170745f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-body-shadow.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-body-shadow.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-const.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-const.snap index 18a7ddd8e2bb7..0482837db6fcd 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-const.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-const.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 12 + "node_id": 12, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-let.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-let.snap index b7b87cdf8ef66..6b35fffbd60b1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-let.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-let.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-nested-body-shadow.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-nested-body-shadow.snap index 552231c930876..8b28095eb4ffa 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-nested-body-shadow.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-nested-body-shadow.snap @@ -50,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 15 + "node_id": 15, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-nested.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-nested.snap index 1a26e7592d684..8d45e49efdc7f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-nested.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-nested.snap @@ -43,7 +43,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 15 + "node_id": 15, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-param-shadow.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-param-shadow.snap index 973efeb3f72a2..4683fe53e3b17 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-param-shadow.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-param-shadow.snap @@ -28,7 +28,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-partial.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-partial.snap index dc87ac3470eb3..cea91ca740e66 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-partial.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/default-params/readable-ref-partial.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 12 + "node_id": 12, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/inherited-scope.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/inherited-scope.snap index 7056b11827cef..f773bceeb16f9 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/inherited-scope.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/inherited-scope.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "parentScoped", - "node_id": 13 + "node_id": 13, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/params.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/params.snap index 5a93ee0f451c1..f7c4fefad89fa 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/params.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/params.snap @@ -21,13 +21,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 25 + "node_id": 25, + "scope_id": 1 }, { "flags": "ReferenceFlags(Read)", "id": 2, "name": "a", - "node_id": 33 + "node_id": 33, + "scope_id": 1 } ] }, @@ -90,7 +92,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 1, "name": "outer", - "node_id": 28 + "node_id": 28, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/scope.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/scope.snap index c68331a1891e7..e07ac86089d73 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/scope.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/scope.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "i", - "node_id": 16 + "node_id": 16, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/body-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/body-reference.snap index e279e48129c50..a7b112d0839ca 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/body-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/body-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 15 + "node_id": 15, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/param-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/param-reference.snap index 57db73be770d7..7d22e752f03f4 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/param-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/param-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 13 + "node_id": 13, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/return-value-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/return-value-reference.snap index 20546591c42d5..633f24109abca 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/return-value-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/return-value-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/type-param-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/type-param-reference.snap index 77f8d2ae23b45..69f7e52b12f69 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/type-param-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-parameters/type-param-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate-asserts2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate-asserts2.snap index 74fdda5e182f3..c8af3dc7ce608 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate-asserts2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate-asserts2.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 18 + "node_id": 18, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate1.snap index 67f6568f35ac4..90a2fa812e631 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate1.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 0, "name": "arg", - "node_id": 19 + "node_id": 19, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate2.snap index f25181d03e149..ce7543c4d1162 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/function-expression/type-predicate2.snap @@ -28,7 +28,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Read)", "id": 1, "name": "arg", - "node_id": 23 + "node_id": 23, + "scope_id": 2 } ] } @@ -49,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 18 + "node_id": 18, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/class.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/class.snap index 4478d614c022a..96efd59f2f4ca 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/class.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/class.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 6 + "node_id": 6, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/function.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/function.snap index fecbe306de873..58f87d0d0e671 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/function.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/function.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti "flags": "ReferenceFlags(Read)", "id": 0, "name": "top", - "node_id": 7 + "node_id": 7, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-const.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-const.snap index 70052d664e1f2..19ce51ee1dfc4 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-const.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-const.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti "flags": "ReferenceFlags(Read)", "id": 0, "name": "top", - "node_id": 9 + "node_id": 9, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-let.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-let.snap index faa384bae5dee..1222257f5abd9 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-let.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-let.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti "flags": "ReferenceFlags(Read)", "id": 0, "name": "top", - "node_id": 9 + "node_id": 9, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-var.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-var.snap index 69b5dae05a4a7..7ae81b62f47d1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-var.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/module/variable-decl-var.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti "flags": "ReferenceFlags(Read)", "id": 0, "name": "top", - "node_id": 9 + "node_id": 9, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/class.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/class.snap index 94045489e0474..11a5359f25bd1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/class.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/class.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 6 + "node_id": 6, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/function.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/function.snap index 6326869634cab..01a887046701a 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/function.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/function.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti "flags": "ReferenceFlags(Read)", "id": 0, "name": "top", - "node_id": 7 + "node_id": 7, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-const.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-const.snap index 8cae5fdfbee05..f582f71ed6317 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-const.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-const.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti "flags": "ReferenceFlags(Read)", "id": 0, "name": "top", - "node_id": 9 + "node_id": 9, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-let.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-let.snap index c262f04314fd8..2ec3568b873ce 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-let.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-let.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti "flags": "ReferenceFlags(Read)", "id": 0, "name": "top", - "node_id": 9 + "node_id": 9, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-var.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-var.snap index 0a789a2a26e58..ca1382d3db97e 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-var.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resolution/script/variable-decl-var.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti "flags": "ReferenceFlags(Read)", "id": 0, "name": "top", - "node_id": 9 + "node_id": 9, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/default.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/default.snap index 3e63520b12ee3..8f74177b9e341 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/default.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/default.snap @@ -27,13 +27,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/default. "flags": "ReferenceFlags(Read)", "id": 0, "name": "v", - "node_id": 6 + "node_id": 6, + "scope_id": 0 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "v", - "node_id": 10 + "node_id": 10, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/equals1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/equals1.snap index bf2f938db8b01..fff870124c2ea 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/equals1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/equals1.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/equals1. "flags": "ReferenceFlags(Read)", "id": 0, "name": "foo", - "node_id": 6 + "node_id": 6, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/equals2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/equals2.snap index ca11af83e109f..1b33304af51e5 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/equals2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/equals2.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/equals2. "flags": "ReferenceFlags(Read)", "id": 0, "name": "x", - "node_id": 7 + "node_id": 7, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/named-alias.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/named-alias.snap index 5aef7194fd238..7a270949cc511 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/named-alias.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/named-alias.snap @@ -27,13 +27,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/named-al "flags": "ReferenceFlags(Read)", "id": 0, "name": "t", - "node_id": 7 + "node_id": 7, + "scope_id": 0 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "t", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/named.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/named.snap index 70f0de1ed81a7..fe9840ca4c01a 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/named.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/named.snap @@ -27,13 +27,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/named.ts "flags": "ReferenceFlags(Read)", "id": 0, "name": "v", - "node_id": 7 + "node_id": 7, + "scope_id": 0 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "v", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/namespace.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/namespace.snap index 6f20caff9b091..445382f0f2eea 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/namespace.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/namespace.snap @@ -27,13 +27,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/namespac "flags": "ReferenceFlags(Read)", "id": 0, "name": "v", - "node_id": 6 + "node_id": 6, + "scope_id": 0 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "v", - "node_id": 10 + "node_id": 10, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-default-value.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-default-value.snap index 5a68fa3e59ce2..a3ced2289457e 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-default-value.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-default-value.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-def "flags": "ReferenceFlags(Type)", "id": 0, "name": "foo", - "node_id": 8 + "node_id": 8, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-default.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-default.snap index f631c81dee88d..fb3e00291182f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-default.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-default.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-def "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 8 + "node_id": 8, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-inline-value.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-inline-value.snap index 0f9886f1ff3c8..2ceaaa57919c9 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-inline-value.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-inline-value.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-inl "flags": "ReferenceFlags(Type)", "id": 0, "name": "foo", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-inline.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-inline.snap index 163170e4f12cc..6aa922d65cfd0 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-inline.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-inline.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-inl "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-named-value.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-named-value.snap index 6e55ab4d6e039..4e95fa096867b 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-named-value.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-named-value.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-nam "flags": "ReferenceFlags(Type)", "id": 0, "name": "foo", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-named.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-named.snap index 40df90d539077..eae944ade356d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-named.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-named.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/import/type-nam "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-expressions/type-arguments1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-expressions/type-arguments1.snap index 16f98f130216c..acc8a48ee8c5c 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-expressions/type-arguments1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-expressions/type-arguments1.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-e "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] } @@ -43,7 +44,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-e "flags": "ReferenceFlags(Type)", "id": 2, "name": "T", - "node_id": 24 + "node_id": 24, + "scope_id": 2 } ] } @@ -64,7 +66,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-e "flags": "ReferenceFlags(Read)", "id": 1, "name": "Foo", - "node_id": 21 + "node_id": 21, + "scope_id": 2 } ] }, @@ -78,7 +81,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-e "flags": "ReferenceFlags(Read)", "id": 3, "name": "Bar", - "node_id": 27 + "node_id": 27, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-expressions/type-arguments2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-expressions/type-arguments2.snap index 369f90e8c4474..daad0177874b0 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-expressions/type-arguments2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-expressions/type-arguments2.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-e "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, @@ -35,7 +36,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-e "flags": "ReferenceFlags(Read)", "id": 1, "name": "value", - "node_id": 17 + "node_id": 17, + "scope_id": 1 } ] } @@ -57,7 +59,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-e "flags": "ReferenceFlags(Type)", "id": 3, "name": "T", - "node_id": 27 + "node_id": 27, + "scope_id": 2 } ] } @@ -78,13 +81,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-e "flags": "ReferenceFlags(Type)", "id": 2, "name": "makeBox", - "node_id": 24 + "node_id": 24, + "scope_id": 2 }, { "flags": "ReferenceFlags(Read)", "id": 4, "name": "makeBox", - "node_id": 32 + "node_id": 32, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/attribute-spread.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/attribute-spread.snap index df96501641c2f..07c1d1e1b7c02 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/attribute-spread.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/attribute-spread.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/attribute-s "flags": "ReferenceFlags(Read)", "id": 1, "name": "x", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/attribute.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/attribute.snap index 329d34e3e23c3..eb549f6e731cf 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/attribute.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/attribute.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/attribute.t "flags": "ReferenceFlags(Read)", "id": 1, "name": "x", - "node_id": 16 + "node_id": 16, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/children.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/children.snap index dda5d3b3bcbe2..708b8aff01e95 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/children.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/children.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/children.ts "flags": "ReferenceFlags(Read)", "id": 1, "name": "child", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-namespaced1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-namespaced1.snap index 843b373ca810a..2e8378aa94ec1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-namespaced1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-namespaced1.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-n "flags": "ReferenceFlags(Read)", "id": 0, "name": "X", - "node_id": 18 + "node_id": 18, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-namespaced2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-namespaced2.snap index 3b88fcae3eb67..c4eea7316b50d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-namespaced2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-namespaced2.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-n "flags": "ReferenceFlags(Read)", "id": 0, "name": "x", - "node_id": 18 + "node_id": 18, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component.snap index cf7cc5d05abce..4dfaf1ce8de19 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component.t "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 8 + "node_id": 8, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/fragment-children.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/fragment-children.snap index 7820c93e2cdb0..e2e914af6b86d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/fragment-children.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/fragment-children.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/fragment-ch "flags": "ReferenceFlags(Read)", "id": 0, "name": "child", - "node_id": 9 + "node_id": 9, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/generic-type-param.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/generic-type-param.snap index b7e6c7ef6383d..8d4b2b9457782 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/generic-type-param.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/generic-type-param.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/generic-typ "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/namespaced-attribute.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/namespaced-attribute.snap index 3aa432d947f51..9cccec4d5d26f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/namespaced-attribute.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/namespaced-attribute.snap @@ -28,7 +28,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/namespaced- "flags": "ReferenceFlags(Read)", "id": 3, "name": "props", - "node_id": 49 + "node_id": 49, + "scope_id": 2 } ] } @@ -70,7 +71,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/namespaced- "flags": "ReferenceFlags(Type)", "id": 2, "name": "FooProps", - "node_id": 41 + "node_id": 41, + "scope_id": 2 } ] }, @@ -84,13 +86,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/namespaced- "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 10 + "node_id": 10, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "Foo", - "node_id": 21 + "node_id": 21, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/member-expression/member-expression.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/member-expression/member-expression.snap index 039c3608b34e9..7e04a6c1eabaa 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/member-expression/member-expression.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/member-expression/member-expression.snap @@ -19,31 +19,36 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/member-expressi "flags": "ReferenceFlags(Read)", "id": 0, "name": "x", - "node_id": 7 + "node_id": 7, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "x", - "node_id": 14 + "node_id": 14, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 2, "name": "x", - "node_id": 21 + "node_id": 21, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 3, "name": "x", - "node_id": 28 + "node_id": 28, + "scope_id": 0 }, { "flags": "ReferenceFlags(Read)", "id": 4, "name": "x", - "node_id": 35 + "node_id": 35, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/new-expression.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/new-expression.snap index 22eb1c5f40e0d..6d10c0f8307f5 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/new-expression.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/new-expression.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/ "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] }, @@ -41,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/ "flags": "ReferenceFlags(Read)", "id": 1, "name": "a", - "node_id": 11 + "node_id": 11, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/type-parameters1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/type-parameters1.snap index c9d2993a65e4f..f297e868634d7 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/type-parameters1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/type-parameters1.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/new-expression/ "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/external-ref.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/external-ref.snap index a21182835dc70..35df7b5b74f1a 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/external-ref.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/external-ref.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/externa "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 9 + "node_id": 9, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/literal-member-ref.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/literal-member-ref.snap index 0166f00963161..5cb3b82e7069e 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/literal-member-ref.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/literal-member-ref.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/literal "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/member-ref.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/member-ref.snap index 5459610e57948..03960596d269f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/member-ref.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/member-ref.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/member- "flags": "ReferenceFlags(Read)", "id": 0, "name": "a", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/self-ref.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/self-ref.snap index 73c99c4ba8b9c..92035cb4257ea 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/self-ref.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/self-ref.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-enum/self-re "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 10 + "node_id": 10, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/class-namespace.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/class-namespace.snap index 962ca12614c32..124a18511abac 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/class-namespace.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/class-namespace.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/decla "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 15 + "node_id": 15, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/function-namespace.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/function-namespace.snap index 11d3ecd44ac5b..c4c14c92f67f5 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/function-namespace.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/function-namespace.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/decla "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 16 + "node_id": 16, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/namespace-variable.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/namespace-variable.snap index a8f6a537086fe..438c32865775b 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/namespace-variable.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/declaration-merging/namespace-variable.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/decla "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 11 + "node_id": 11, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/external-ref.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/external-ref.snap index 55ed6639345b6..a4db28a42b2a1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/external-ref.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/external-ref.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/exter "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 11 + "node_id": 11, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/name-shadowed-in-body.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/name-shadowed-in-body.snap index acf0e43e9ef9d..f2e23b3fad000 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/name-shadowed-in-body.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/name-shadowed-in-body.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/name- "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 12 + "node_id": 12, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/namespace.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/namespace.snap index 5aae8912ca5de..9a930656fac41 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/namespace.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/namespace.snap @@ -35,13 +35,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/names "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 11 + "node_id": 11, + "scope_id": 1 }, { "flags": "ReferenceFlags(Read)", "id": 2, "name": "Foo", - "node_id": 19 + "node_id": 19, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/self-ref.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/self-ref.snap index b18e51ee51df3..5c1748b605711 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/self-ref.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/self-ref.snap @@ -35,7 +35,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/self- "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-array-destructure.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-array-destructure.snap index f10fdbe3eb35b..927903a8418be 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-array-destructure.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-array-destructure.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-default.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-default.snap index 6ccc7afcb53fe..efbd43ae19f0e 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-default.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-default.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-object-destructure.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-object-destructure.snap index c36f64cef24ba..4363b119c4c50 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-object-destructure.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-object-destructure.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 14 + "node_id": 14, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-rest.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-rest.snap index 0b980d6b1b748..ea7a93be6818b 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-rest.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter-rest.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 14 + "node_id": 14, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter.snap index 9d8b199a717d7..d2c312d45df37 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/parameter.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-array-destructure.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-array-destructure.snap index 44ceaffe8e19c..2f9cbad4014e9 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-array-destructure.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-array-destructure.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-const.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-const.snap index 5018180b56216..af8017da3fadc 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-const.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-const.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-let.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-let.snap index 1a0f15697f791..0353cacc640ee 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-let.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-let.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-object-destructure.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-object-destructure.snap index 1a4d3ba706daf..fcca995c377c3 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-object-destructure.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-object-destructure.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-var.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-var.snap index e3e4f0ad44801..4b08dd7d7c156 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-var.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation/variable-var.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 10 + "node_id": 10, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/angle-bracket.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/angle-bracket.snap index e931cbbca1b3e..8ce9c57588926 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/angle-bracket.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/angle-bracket.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/ "flags": "ReferenceFlags(Read)", "id": 1, "name": "x", - "node_id": 13 + "node_id": 13, + "scope_id": 0 } ] }, @@ -41,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/ "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/as.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/as.snap index 7729aa51b5ee3..7483da6af73fd 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/as.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/as.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/ "flags": "ReferenceFlags(Read)", "id": 0, "name": "x", - "node_id": 11 + "node_id": 11, + "scope_id": 0 } ] }, @@ -41,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/ "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 13 + "node_id": 13, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/angle-bracket-assignment.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/angle-bracket-assignment.snap index 485775a7494b0..cc6bf020452db 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/angle-bracket-assignment.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/angle-bracket-assignment.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/ "flags": "ReferenceFlags(Read | Write)", "id": 0, "name": "x", - "node_id": 13 + "node_id": 13, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/as-assignment.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/as-assignment.snap index 3f02773bd24f1..49a9a71e35391 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/as-assignment.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/as-assignment.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/ "flags": "ReferenceFlags(Read | Write)", "id": 0, "name": "x", - "node_id": 12 + "node_id": 12, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/non-null-assignment.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/non-null-assignment.snap index 7e4592cdddfd8..c774082d7491b 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/non-null-assignment.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/assignment/non-null-assignment.snap @@ -19,7 +19,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/ "flags": "ReferenceFlags(Read | Write)", "id": 0, "name": "x", - "node_id": 12 + "node_id": 12, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/satisfies.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/satisfies.snap index 0a4e1722a511f..d558b3ed17b8b 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/satisfies.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/satisfies.snap @@ -27,7 +27,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/ "flags": "ReferenceFlags(Read)", "id": 0, "name": "x", - "node_id": 11 + "node_id": 11, + "scope_id": 0 } ] }, @@ -41,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-assertion/ "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 13 + "node_id": 13, + "scope_id": 0 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional-nested.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional-nested.snap index 872061e47f851..0418cc38aee05 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional-nested.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional-nested.snap @@ -23,7 +23,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 2, "name": "U", - "node_id": 16 + "node_id": 16, + "scope_id": 2 } ] } @@ -45,7 +46,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 5, "name": "U", - "node_id": 27 + "node_id": 27, + "scope_id": 3 } ] } @@ -66,13 +68,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 8 + "node_id": 8, + "scope_id": 1 }, { "flags": "ReferenceFlags(Type)", "id": 3, "name": "T", - "node_id": 19 + "node_id": 19, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional1.snap index 4d5077640551b..e1efa2f8f9393 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional1.snap @@ -23,7 +23,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "V", - "node_id": 13 + "node_id": 13, + "scope_id": 2 } ] } @@ -44,7 +45,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 8 + "node_id": 8, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional2.snap index ea6072e9b673e..d3cae4a690c39 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional2.snap @@ -23,7 +23,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 9 + "node_id": 9, + "scope_id": 2 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional3.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional3.snap index af5ca8c9542f1..a9cde8e3d04dc 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional3.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional3.snap @@ -39,7 +39,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "I", - "node_id": 20 + "node_id": 20, + "scope_id": 2 } ] } @@ -60,7 +61,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 8 + "node_id": 8, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional4.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional4.snap index 75fc4529178fc..37798e0a75499 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional4.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional4.snap @@ -23,7 +23,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "I", - "node_id": 19 + "node_id": 19, + "scope_id": 2 } ] } @@ -44,7 +45,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 8 + "node_id": 8, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional5.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional5.snap index 8ccbfb797c9c1..d136d75ed88b1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional5.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/conditional5.snap @@ -55,7 +55,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "I", - "node_id": 33 + "node_id": 33, + "scope_id": 2 } ] } @@ -76,7 +77,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 8 + "node_id": 8, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/dual-type-value.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/dual-type-value.snap index 9b9458b32dc32..9f09f6ebb90be 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/dual-type-value.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/dual-type-value.snap @@ -34,13 +34,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "dual", - "node_id": 11 + "node_id": 11, + "scope_id": 2 }, { "flags": "ReferenceFlags(Read)", "id": 1, "name": "dual", - "node_id": 15 + "node_id": 15, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor-generics1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor-generics1.snap index 06d774342be30..135995c452d85 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor-generics1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor-generics1.snap @@ -44,7 +44,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 16 + "node_id": 16, + "scope_id": 3 } ] } @@ -65,7 +66,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 19 + "node_id": 19, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor-generics2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor-generics2.snap index cdbf4a7760f85..7ed0a96529ada 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor-generics2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor-generics2.snap @@ -30,7 +30,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 16 + "node_id": 16, + "scope_id": 3 } ] }, @@ -64,7 +65,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 19 + "node_id": 19, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor.snap index 2530d669c99e4..ea5c80e0f97ac 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/constructor.snap @@ -50,13 +50,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 13 + "node_id": 13, + "scope_id": 3 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 16 + "node_id": 16, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function-generics1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function-generics1.snap index 388ba2836393a..164202bab5b4c 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function-generics1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function-generics1.snap @@ -44,7 +44,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 16 + "node_id": 16, + "scope_id": 3 } ] } @@ -65,7 +66,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 19 + "node_id": 19, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function-generics2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function-generics2.snap index 5e49a65cd3bcd..d9ebad2845ae3 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function-generics2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function-generics2.snap @@ -30,7 +30,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 16 + "node_id": 16, + "scope_id": 3 } ] }, @@ -64,7 +65,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 19 + "node_id": 19, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function1.snap index bb561cd59c083..1e3b1f52fa760 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function1.snap @@ -50,13 +50,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 13 + "node_id": 13, + "scope_id": 3 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 16 + "node_id": 16, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function2.snap index 70c363ece244f..5aa97658d51b3 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/function2.snap @@ -23,7 +23,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "arg", - "node_id": 15 + "node_id": 15, + "scope_id": 2 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/array-pattern.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/array-pattern.snap index a810fa75854dd..cb7c8609c2c62 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/array-pattern.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/array-pattern.snap @@ -37,7 +37,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 15 + "node_id": 15, + "scope_id": 2 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/object-pattern.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/object-pattern.snap index f27837d688bd9..60466a63abef0 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/object-pattern.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/object-pattern.snap @@ -37,7 +37,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 20 + "node_id": 20, + "scope_id": 2 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/rest-element.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/rest-element.snap index 3e5bbd82101d9..0efddc291c29f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/rest-element.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/function/params/rest-element.snap @@ -37,7 +37,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 15 + "node_id": 15, + "scope_id": 2 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/import-type-with-type-params.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/import-type-with-type-params.snap index 88412d010399c..8fe80c6ab1d36 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/import-type-with-type-params.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/import-type-with-type-params.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "Param", - "node_id": 11 + "node_id": 11, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access1.snap index a4ddedc197b5d..ff84f844efdf1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access1.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access2.snap index 91bfbccdcd8ed..eccd9660738f3 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access2.snap @@ -41,7 +41,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 16 + "node_id": 16, + "scope_id": 3 } ] }, @@ -55,7 +56,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "K", - "node_id": 18 + "node_id": 18, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access3.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access3.snap index 18c9d2a1afb19..27dab58fc3b49 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access3.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/index-access3.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 16 + "node_id": 16, + "scope_id": 2 } ] }, @@ -48,7 +49,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "k", - "node_id": 18 + "node_id": 18, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/infer-type-constraint.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/infer-type-constraint.snap index a57a45d15a3f1..8931807beb5db 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/infer-type-constraint.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/infer-type-constraint.snap @@ -30,7 +30,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 2, "name": "Id", - "node_id": 24 + "node_id": 24, + "scope_id": 3 } ] } @@ -51,7 +52,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 13 + "node_id": 13, + "scope_id": 2 } ] } @@ -72,7 +74,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "X", - "node_id": 22 + "node_id": 22, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface-heritage1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface-heritage1.snap index 23d04ee575dd4..4c016fd59ec1f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface-heritage1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface-heritage1.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "Parent", - "node_id": 7 + "node_id": 7, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface-heritage2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface-heritage2.snap index fd6bfcdc66357..1267371e653d9 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface-heritage2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface-heritage2.snap @@ -64,7 +64,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "Member", - "node_id": 15 + "node_id": 15, + "scope_id": 4 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface2.snap index 51b22ad490e0f..eb8297c3a4c06 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/interface2.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 7 + "node_id": 7, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type1.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type1.snap index 36bd8d08b6631..3a2e8f9c68421 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type1.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type1.snap @@ -41,7 +41,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "Color", - "node_id": 24 + "node_id": 24, + "scope_id": 3 } ] }, @@ -55,7 +56,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "Quantity", - "node_id": 22 + "node_id": 22, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type2.snap index d476f34bbff62..215697d7b8a8f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type2.snap @@ -21,25 +21,29 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 17 + "node_id": 17, + "scope_id": 1 }, { "flags": "ReferenceFlags(Type)", "id": 3, "name": "T", - "node_id": 22 + "node_id": 22, + "scope_id": 1 }, { "flags": "ReferenceFlags(Type)", "id": 5, "name": "T", - "node_id": 27 + "node_id": 27, + "scope_id": 1 }, { "flags": "ReferenceFlags(Type)", "id": 7, "name": "T", - "node_id": 32 + "node_id": 32, + "scope_id": 1 } ] } @@ -67,7 +71,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 8, "name": "EnthusiasticGreeting", - "node_id": 36 + "node_id": 36, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type3.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type3.snap index 62756710ad320..0d8a675dc4513 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type3.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/literal-type3.snap @@ -49,7 +49,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "VerticalAlignment", - "node_id": 30 + "node_id": 30, + "scope_id": 3 } ] }, @@ -63,7 +64,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "HorizontalAlignment", - "node_id": 32 + "node_id": 32, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/mapped-named.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/mapped-named.snap index d21912f71a227..56b5014ca27a9 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/mapped-named.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/mapped-named.snap @@ -30,13 +30,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "k", - "node_id": 14 + "node_id": 14, + "scope_id": 3 }, { "flags": "ReferenceFlags(Type)", "id": 3, "name": "k", - "node_id": 19 + "node_id": 19, + "scope_id": 3 } ] } @@ -63,7 +65,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 2, "name": "T", - "node_id": 17 + "node_id": 17, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/mapped.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/mapped.snap index 0a20115cd73db..e073f2ca8a44f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/mapped.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/mapped.snap @@ -30,7 +30,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 2, "name": "k", - "node_id": 17 + "node_id": 17, + "scope_id": 3 } ] } @@ -57,7 +58,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 15 + "node_id": 15, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/qualified-name.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/qualified-name.snap index 0aa2e99b48edf..def9fcca958c8 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/qualified-name.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/qualified-name.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/call-generics.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/call-generics.snap index 1c9121422d8d4..32c40787ccb51 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/call-generics.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/call-generics.snap @@ -30,7 +30,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 17 + "node_id": 17, + "scope_id": 3 } ] }, @@ -64,7 +65,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 20 + "node_id": 20, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/call.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/call.snap index a5c1b4892f25a..4a947b2987320 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/call.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/call.snap @@ -50,13 +50,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 14 + "node_id": 14, + "scope_id": 3 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 17 + "node_id": 17, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/construct-generics.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/construct-generics.snap index 82435558bf018..6631b70bb6928 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/construct-generics.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/construct-generics.snap @@ -30,7 +30,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "U", - "node_id": 17 + "node_id": 17, + "scope_id": 3 } ] }, @@ -64,7 +65,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 20 + "node_id": 20, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/construct.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/construct.snap index 328f74d3fac88..8392e43f9b43e 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/construct.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/construct.snap @@ -50,13 +50,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 14 + "node_id": 14, + "scope_id": 3 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 17 + "node_id": 17, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/index-sig.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/index-sig.snap index 23eb587b73ff1..c83745cec280d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/index-sig.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/index-sig.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 14 + "node_id": 14, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-computed-name.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-computed-name.snap index 80cd4a86eb1ff..c7c76cdf1526f 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-computed-name.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-computed-name.snap @@ -50,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Read)", "id": 0, "name": "x", - "node_id": 13 + "node_id": 13, + "scope_id": 3 } ] }, @@ -64,13 +65,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 19 + "node_id": 19, + "scope_id": 3 }, { "flags": "ReferenceFlags(Type)", "id": 2, "name": "T", - "node_id": 22 + "node_id": 22, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-computed-name2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-computed-name2.snap index 28f7b6e1cc115..4c67ee072ac37 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-computed-name2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-computed-name2.snap @@ -50,7 +50,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Read)", "id": 0, "name": "Foo", - "node_id": 11 + "node_id": 11, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-generics.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-generics.snap index 11c5bfbb3db34..d287730b8eafe 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-generics.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method-generics.snap @@ -30,7 +30,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "U", - "node_id": 21 + "node_id": 21, + "scope_id": 3 } ] }, @@ -64,7 +65,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 18 + "node_id": 18, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method.snap index 75214916b3c2a..d4fd2528c941a 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/method.snap @@ -50,13 +50,15 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 15 + "node_id": 15, + "scope_id": 3 }, { "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 18 + "node_id": 18, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property-computed-name.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property-computed-name.snap index fc7f078ea8272..2d47e1e631d31 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property-computed-name.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property-computed-name.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "x", - "node_id": 13 + "node_id": 13, + "scope_id": 2 } ] }, @@ -48,7 +49,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 16 + "node_id": 16, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property-computed-name2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property-computed-name2.snap index 9dc4d9566f91a..b074f8c1b7109 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property-computed-name2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property-computed-name2.snap @@ -42,7 +42,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "Foo", - "node_id": 11 + "node_id": 11, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property.snap index 5531d5b4dc591..f90f7a55d3a37 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/signatures/property.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 12 + "node_id": 12, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-labelled-rest.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-labelled-rest.snap index e3360b28a3e5a..1269103bee910 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-labelled-rest.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-labelled-rest.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 13 + "node_id": 13, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-labelled.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-labelled.snap index ff5920db96056..2b1c67bed2aa3 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-labelled.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-labelled.snap @@ -41,7 +41,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T1", - "node_id": 15 + "node_id": 15, + "scope_id": 3 } ] }, @@ -55,7 +56,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T2", - "node_id": 19 + "node_id": 19, + "scope_id": 3 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-rest.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-rest.snap index b554f841bfee0..f7aa5bf77b9d1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-rest.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple-rest.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 10 + "node_id": 10, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple.snap index 5c6c554186214..00a33b56428b9 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/tuple.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/body-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/body-reference.snap index a2bfaddd38db2..c3e41f7d7a756 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/body-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/body-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/extends-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/extends-reference.snap index 6c40c1462baee..f71694cb1d3a1 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/extends-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/extends-reference.snap @@ -36,7 +36,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "T", - "node_id": 16 + "node_id": 16, + "scope_id": 2 } ] } @@ -57,7 +58,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 13 + "node_id": 13, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/type-param-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/type-param-reference.snap index ab363fb7f2843..70257b96045c5 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/type-param-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/type-param-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/type-parameter-declaration-extends.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/type-parameter-declaration-extends.snap index 10d8c68f8a45e..0ee3ed9dc4f53 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/type-parameter-declaration-extends.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/interface/type-parameter-declaration-extends.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/tagged-template.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/tagged-template.snap index 74d01d5ed1d91..e8da23b115875 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/tagged-template.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/tagged-template.snap @@ -49,7 +49,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 1, "name": "StyledPaymentProps", - "node_id": 28 + "node_id": 28, + "scope_id": 0 } ] }, @@ -63,7 +64,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Read)", "id": 0, "name": "div", - "node_id": 25 + "node_id": 25, + "scope_id": 0 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/body-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/body-reference.snap index b1ecb9574c4c0..fb0eba7de9c9b 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/body-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/body-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 7 + "node_id": 7, + "scope_id": 1 } ] } diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/type-param-reference.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/type-param-reference.snap index 61205ded32a9a..59447c2376cf0 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/type-param-reference.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/type-param-reference.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/type-parameter-declaration-extends.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/type-parameter-declaration-extends.snap index 4fc412042c26c..ed7ed164c81cd 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/type-parameter-declaration-extends.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-parameters/type-decl/type-parameter-declaration-extends.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 9 + "node_id": 9, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query-qualified.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query-qualified.snap index 634a35fbe914d..940a2d6c47cb3 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query-qualified.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query-qualified.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "x", - "node_id": 16 + "node_id": 16, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query-with-parameters.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query-with-parameters.snap index a3bedc63314a8..af20e101a053d 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query-with-parameters.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query-with-parameters.snap @@ -21,7 +21,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 11 + "node_id": 11, + "scope_id": 1 } ] }, @@ -35,7 +36,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Read)", "id": 1, "name": "y", - "node_id": 17 + "node_id": 17, + "scope_id": 1 } ] } @@ -57,7 +59,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 3, "name": "T", - "node_id": 28 + "node_id": 28, + "scope_id": 2 } ] } @@ -78,7 +81,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 2, "name": "foo", - "node_id": 25 + "node_id": 25, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query.snap index 829cdfe157aef..9309bc1520d2e 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type-query.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "x", - "node_id": 8 + "node_id": 8, + "scope_id": 1 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type2.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type2.snap index 97336c2902fe7..3ef835111692c 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type2.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type2.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "A", - "node_id": 8 + "node_id": 8, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type3.snap b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type3.snap index ec6399d8c4376..2d3207658f4ec 100644 --- a/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type3.snap +++ b/crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaration/type3.snap @@ -34,7 +34,8 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio "flags": "ReferenceFlags(Type)", "id": 0, "name": "T", - "node_id": 16 + "node_id": 16, + "scope_id": 2 } ] }, diff --git a/crates/oxc_semantic/tests/main.rs b/crates/oxc_semantic/tests/main.rs index 7dc8a95b07527..4d6604c25190b 100644 --- a/crates/oxc_semantic/tests/main.rs +++ b/crates/oxc_semantic/tests/main.rs @@ -90,7 +90,10 @@ fn get_scope_snapshot(semantic: &Semantic, scopes: impl Iterator format!("\"name\": {:?},", semantic.reference_name(reference)).as_str(), ); result.push_str( - format!("\"node_id\": {}", reference.node_id().index()).as_str(), + format!("\"node_id\": {},", reference.node_id().index()).as_str(), + ); + result.push_str( + format!("\"scope_id\": {}", reference.scope_id().index()).as_str(), ); result.push('}'); }); diff --git a/crates/oxc_syntax/src/reference.rs b/crates/oxc_syntax/src/reference.rs index 29c9bde0c0861..4c6b367ba8af3 100644 --- a/crates/oxc_syntax/src/reference.rs +++ b/crates/oxc_syntax/src/reference.rs @@ -6,7 +6,7 @@ use serde::Serialize; use oxc_allocator::{Allocator, CloneIn}; -use crate::{node::NodeId, symbol::SymbolId}; +use crate::{node::NodeId, scope::ScopeId, symbol::SymbolId}; use oxc_ast_macros::ast; @@ -227,6 +227,8 @@ pub struct Reference { /// the reference's scope tree. Usually this indicates a global variable or /// a reference to a non-existent symbol. symbol_id: Option, + /// The scope in which this reference occurs. + scope_id: ScopeId, /// Describes how this referenced is used by other AST nodes. References can /// be reads, writes, or both. flags: ReferenceFlags, @@ -235,14 +237,19 @@ pub struct Reference { impl Reference { /// Create a new unresolved reference. #[inline] - pub fn new(node_id: NodeId, flags: ReferenceFlags) -> Self { - Self { node_id, symbol_id: None, flags } + pub fn new(node_id: NodeId, scope_id: ScopeId, flags: ReferenceFlags) -> Self { + Self { node_id, symbol_id: None, scope_id, flags } } /// Create a new resolved reference on a symbol. #[inline] - pub fn new_with_symbol_id(node_id: NodeId, symbol_id: SymbolId, flags: ReferenceFlags) -> Self { - Self { node_id, symbol_id: Some(symbol_id), flags } + pub fn new_with_symbol_id( + node_id: NodeId, + symbol_id: SymbolId, + scope_id: ScopeId, + flags: ReferenceFlags, + ) -> Self { + Self { node_id, symbol_id: Some(symbol_id), scope_id, flags } } /// Get the id of the node that is referencing the symbol. @@ -264,6 +271,12 @@ impl Reference { self.symbol_id = Some(symbol_id); } + /// Get the id of the scope in which this reference occurs. + #[inline] + pub fn scope_id(&self) -> ScopeId { + self.scope_id + } + #[inline] pub fn flags(&self) -> ReferenceFlags { self.flags diff --git a/crates/oxc_traverse/src/context/scoping.rs b/crates/oxc_traverse/src/context/scoping.rs index f3d414544e166..2fc1446ca7d90 100644 --- a/crates/oxc_traverse/src/context/scoping.rs +++ b/crates/oxc_traverse/src/context/scoping.rs @@ -299,7 +299,8 @@ impl<'a> TraverseScoping<'a> { symbol_id: SymbolId, flags: ReferenceFlags, ) -> ReferenceId { - let reference = Reference::new_with_symbol_id(NodeId::DUMMY, symbol_id, flags); + let reference = + Reference::new_with_symbol_id(NodeId::DUMMY, symbol_id, self.current_scope_id, flags); let reference_id = self.scoping.create_reference(reference); self.scoping.add_resolved_reference(symbol_id, reference_id); reference_id @@ -307,7 +308,7 @@ impl<'a> TraverseScoping<'a> { /// Create an unbound reference pub fn create_unbound_reference(&mut self, name: &str, flags: ReferenceFlags) -> ReferenceId { - let reference = Reference::new(NodeId::DUMMY, flags); + let reference = Reference::new(NodeId::DUMMY, self.current_scope_id, flags); let reference_id = self.scoping.create_reference(reference); self.scoping.add_root_unresolved_reference(name, reference_id); reference_id