This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rome_js_semantic): correct the export determination when a variab…
…le and an `interface` had the same name (#4468)
- Loading branch information
Showing
6 changed files
with
142 additions
and
27 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
8 changes: 8 additions & 0 deletions
8
...rome_js_analyze/tests/specs/correctness/noUnusedVariables/validClassAndInterfaceExport.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,8 @@ | ||
/* should not generate diagnostics */ | ||
class A {} | ||
|
||
interface A { | ||
foo: string; | ||
} | ||
|
||
export { A }; |
18 changes: 18 additions & 0 deletions
18
...js_analyze/tests/specs/correctness/noUnusedVariables/validClassAndInterfaceExport.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,18 @@ | ||
--- | ||
source: crates/rome_js_analyze/tests/spec_tests.rs | ||
expression: validClassAndInterfaceExport.ts | ||
--- | ||
# Input | ||
```js | ||
/* should not generate diagnostics */ | ||
class A {} | ||
|
||
interface A { | ||
foo: string; | ||
} | ||
|
||
export { A }; | ||
|
||
``` | ||
|
||
|
8 changes: 8 additions & 0 deletions
8
crates/rome_js_analyze/tests/specs/correctness/noUnusedVariables/validVariableAndExport.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,8 @@ | ||
/* should not generate diagnostics */ | ||
const a = ""; | ||
|
||
interface a { | ||
foo: string; | ||
} | ||
|
||
export { a }; |
18 changes: 18 additions & 0 deletions
18
.../rome_js_analyze/tests/specs/correctness/noUnusedVariables/validVariableAndExport.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,18 @@ | ||
--- | ||
source: crates/rome_js_analyze/tests/spec_tests.rs | ||
expression: validVariableAndExport.ts | ||
--- | ||
# Input | ||
```js | ||
/* should not generate diagnostics */ | ||
const a = ""; | ||
|
||
interface a { | ||
foo: string; | ||
} | ||
|
||
export { a }; | ||
|
||
``` | ||
|
||
|
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