Skip to content

Conversation

@weswigham
Copy link
Member

Fixes #55375

The linked issue only repro'd with strict: false and strictNullChecks: true because without those set, we'd reuse input type nodes much more, and not reprint the union type for the field in the Option type. When we traverse that field, we'd see the Test member in another module, and mistakenly try to add it as something to print in the current file. Now, we have guards against actually doing that already, but traversing it at all caused us to reserve the Test name for that symbol in the index file, and thus mangle the original Test name for the other symbol when we reprinted the import in the file later.

@weswigham weswigham requested review from gabritto and sandersn August 15, 2023 23:52
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Aug 15, 2023
@weswigham weswigham merged commit ffec968 into microsoft:main Aug 16, 2023
snovader pushed a commit to EG-A-S/TypeScript that referenced this pull request Sep 23, 2023
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid type definitions generated when imported classes have same name

3 participants