Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(49200): skip duplicated method declarations (#50609)
- Loading branch information
1 parent
4d91204
commit 2644f28
Showing
5 changed files
with
51 additions
and
0 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
17 changes: 17 additions & 0 deletions
17
tests/baselines/reference/declarationEmitMethodDeclaration.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 @@ | ||
//// [a.js] | ||
export default { | ||
methods: { | ||
foo() { } | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
//// [a.d.ts] | ||
declare namespace _default { | ||
namespace methods { | ||
function foo(): void; | ||
} | ||
} | ||
export default _default; |
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/declarationEmitMethodDeclaration.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,10 @@ | ||
=== /a.js === | ||
export default { | ||
methods: { | ||
>methods : Symbol(methods, Decl(a.js, 0, 16)) | ||
|
||
foo() { } | ||
>foo : Symbol(foo, Decl(a.js, 1, 14)) | ||
} | ||
} | ||
|
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/declarationEmitMethodDeclaration.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,13 @@ | ||
=== /a.js === | ||
export default { | ||
>{ methods: { foo() { } }} : { methods: { foo(): void; }; } | ||
|
||
methods: { | ||
>methods : { foo(): void; } | ||
>{ foo() { } } : { foo(): void; } | ||
|
||
foo() { } | ||
>foo : () => void | ||
} | ||
} | ||
|
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 @@ | ||
// @allowJs: true | ||
// @checkJs: true | ||
// @declaration: true | ||
// @emitDeclarationOnly: true | ||
// @filename: /a.js | ||
export default { | ||
methods: { | ||
foo() { } | ||
} | ||
} |