forked from biomejs/biome
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(js_semantic): add semantic scope to mapped types (biomejs#958)
- Loading branch information
Showing
5 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
crates/biome_js_analyze/tests/specs/suspicious/noRedeclare/valid-mapped-types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// See https://github.com/biomejs/biome/issues/953 | ||
type X = never; | ||
type Y = never; | ||
export const MyMappingPbToGql: { | ||
[key in X]: never; | ||
} = {}; | ||
export const MyOtherMappingPbToGql: { | ||
[key in Y]: never; | ||
} = {}; |
19 changes: 19 additions & 0 deletions
19
crates/biome_js_analyze/tests/specs/suspicious/noRedeclare/valid-mapped-types.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
source: crates/biome_js_analyze/tests/spec_tests.rs | ||
expression: valid-mapped-types.ts | ||
--- | ||
# Input | ||
```js | ||
// See https://github.com/biomejs/biome/issues/953 | ||
type X = never; | ||
type Y = never; | ||
export const MyMappingPbToGql: { | ||
[key in X]: never; | ||
} = {}; | ||
export const MyOtherMappingPbToGql: { | ||
[key in Y]: never; | ||
} = {}; | ||
|
||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters