Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Partially revert #41044, restoring parameter destructurings in d.ts f…
…iles (#50779)
- Loading branch information
1 parent
28232ca
commit ec6ae1c
Showing
26 changed files
with
190 additions
and
129 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
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
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
4 changes: 2 additions & 2 deletions
4
tests/baselines/reference/declarationEmitBindingPatterns.types
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
17 changes: 17 additions & 0 deletions
17
tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.js
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,17 @@ | ||
//// [declarationEmitDuplicateParameterDestructuring.ts] | ||
export const fn1 = ({ prop: a, prop: b }: { prop: number }) => a + b; | ||
|
||
export const fn2 = ({ prop: a }: { prop: number }, { prop: b }: { prop: number }) => a + b; | ||
|
||
|
||
|
||
|
||
//// [declarationEmitDuplicateParameterDestructuring.d.ts] | ||
export declare const fn1: ({ prop: a, prop: b }: { | ||
prop: number; | ||
}) => number; | ||
export declare const fn2: ({ prop: a }: { | ||
prop: number; | ||
}, { prop: b }: { | ||
prop: number; | ||
}) => number; |
22 changes: 22 additions & 0 deletions
22
tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.symbols
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,22 @@ | ||
=== tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts === | ||
export const fn1 = ({ prop: a, prop: b }: { prop: number }) => a + b; | ||
>fn1 : Symbol(fn1, Decl(declarationEmitDuplicateParameterDestructuring.ts, 0, 12)) | ||
>prop : Symbol(prop, Decl(declarationEmitDuplicateParameterDestructuring.ts, 0, 43)) | ||
>a : Symbol(a, Decl(declarationEmitDuplicateParameterDestructuring.ts, 0, 21)) | ||
>prop : Symbol(prop, Decl(declarationEmitDuplicateParameterDestructuring.ts, 0, 43)) | ||
>b : Symbol(b, Decl(declarationEmitDuplicateParameterDestructuring.ts, 0, 30)) | ||
>prop : Symbol(prop, Decl(declarationEmitDuplicateParameterDestructuring.ts, 0, 43)) | ||
>a : Symbol(a, Decl(declarationEmitDuplicateParameterDestructuring.ts, 0, 21)) | ||
>b : Symbol(b, Decl(declarationEmitDuplicateParameterDestructuring.ts, 0, 30)) | ||
|
||
export const fn2 = ({ prop: a }: { prop: number }, { prop: b }: { prop: number }) => a + b; | ||
>fn2 : Symbol(fn2, Decl(declarationEmitDuplicateParameterDestructuring.ts, 2, 12)) | ||
>prop : Symbol(prop, Decl(declarationEmitDuplicateParameterDestructuring.ts, 2, 34)) | ||
>a : Symbol(a, Decl(declarationEmitDuplicateParameterDestructuring.ts, 2, 21)) | ||
>prop : Symbol(prop, Decl(declarationEmitDuplicateParameterDestructuring.ts, 2, 34)) | ||
>prop : Symbol(prop, Decl(declarationEmitDuplicateParameterDestructuring.ts, 2, 65)) | ||
>b : Symbol(b, Decl(declarationEmitDuplicateParameterDestructuring.ts, 2, 52)) | ||
>prop : Symbol(prop, Decl(declarationEmitDuplicateParameterDestructuring.ts, 2, 65)) | ||
>a : Symbol(a, Decl(declarationEmitDuplicateParameterDestructuring.ts, 2, 21)) | ||
>b : Symbol(b, Decl(declarationEmitDuplicateParameterDestructuring.ts, 2, 52)) | ||
|
26 changes: 26 additions & 0 deletions
26
tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.types
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,26 @@ | ||
=== tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts === | ||
export const fn1 = ({ prop: a, prop: b }: { prop: number }) => a + b; | ||
>fn1 : ({ prop: a, prop: b }: { prop: number;}) => number | ||
>({ prop: a, prop: b }: { prop: number }) => a + b : ({ prop: a, prop: b }: { prop: number;}) => number | ||
>prop : any | ||
>a : number | ||
>prop : any | ||
>b : number | ||
>prop : number | ||
>a + b : number | ||
>a : number | ||
>b : number | ||
|
||
export const fn2 = ({ prop: a }: { prop: number }, { prop: b }: { prop: number }) => a + b; | ||
>fn2 : ({ prop: a }: { prop: number;}, { prop: b }: { prop: number;}) => number | ||
>({ prop: a }: { prop: number }, { prop: b }: { prop: number }) => a + b : ({ prop: a }: { prop: number;}, { prop: b }: { prop: number;}) => number | ||
>prop : any | ||
>a : number | ||
>prop : number | ||
>prop : any | ||
>b : number | ||
>prop : number | ||
>a + b : number | ||
>a : number | ||
>b : number | ||
|
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
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
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
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
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
Oops, something went wrong.