-
-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(isolated-declarations): transform incorrectly when there are mult…
…iple functions with the same name (#3753)
- Loading branch information
Showing
3 changed files
with
28 additions
and
10 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
7 changes: 7 additions & 0 deletions
7
crates/oxc_isolated_declarations/tests/fixtures/function-overloads.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,7 @@ | ||
function a(a: number): number; | ||
function a(a: string): string; | ||
function a(a: any): any {} | ||
|
||
|
||
function b(a: number): number {}; | ||
function b(a: string): string {}; |
10 changes: 10 additions & 0 deletions
10
crates/oxc_isolated_declarations/tests/snapshots/function-overloads.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,10 @@ | ||
--- | ||
source: crates/oxc_isolated_declarations/tests/mod.rs | ||
input_file: crates/oxc_isolated_declarations/tests/fixtures/function-overloads.ts | ||
--- | ||
==================== .D.TS ==================== | ||
|
||
declare function a(a: number): number; | ||
declare function a(a: string): string; | ||
declare function b(a: number): number; | ||
declare function b(a: string): string; |