Skip to content

Conversation

navya9singh
Copy link
Member

Fixes #55658
Importing overload functions caused this issue. Fixed it by ensuring that a symbol's declaration for an overload function was being imported only once.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Oct 24, 2023
@@ -348,7 +348,7 @@ function getTargetFileImportsAndAddExportInOldFile(
if (hasSyntacticModifier(decl, ModifierFlags.Default)) {
oldFileDefault = name;
}
else {
else if (!oldFileNamedImports.includes (name.text)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else if (!oldFileNamedImports.includes (name.text)) {
else if (!oldFileNamedImports.includes(name.text)) {

@@ -176,7 +176,7 @@ function getNewFileImportsAndAddExportInOldFile(
if (hasSyntacticModifier(decl, ModifierFlags.Default)) {
oldFileDefault = name;
}
else {
else if (!oldFileNamedImports.includes (name.text)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's deduplicate this code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Status: Waiting on author
Development

Successfully merging this pull request may close these issues.

Move to new file produces syntax errors with overloaded functions
3 participants