Skip to content

ImportAttributes should go through the same emit phases when in an ImportTypeNode#56395

Merged
rbuckton merged 3 commits intomicrosoft:mainfrom
bloomberg:emit-import-attributes-bug
Dec 8, 2023
Merged

ImportAttributes should go through the same emit phases when in an ImportTypeNode#56395
rbuckton merged 3 commits intomicrosoft:mainfrom
bloomberg:emit-import-attributes-bug

Conversation

@dragomirtitian
Copy link
Copy Markdown
Contributor

Fixes #56394

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 14, 2023
@typescript-bot
Copy link
Copy Markdown
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

@dragomirtitian dragomirtitian force-pushed the emit-import-attributes-bug branch from 53db3dd to a61b9ae Compare November 14, 2023 16:09
Comment thread src/compiler/emitter.ts Outdated
@typescript-bot typescript-bot added For Backlog Bug PRs that fix a backlog bug and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 14, 2023
Comment thread src/compiler/emitter.ts Outdated
Comment thread src/compiler/emitter.ts Outdated
Comment thread src/compiler/types.ts
Unspecified, // Emitting an otherwise unspecified node
EmbeddedStatement, // Emitting an embedded statement
JsxAttributeValue, // Emitting a JSX attribute value
ImportTypeNodeAttributes,// Emitting attributes as part of an ImportTypeNode
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure how much this matters given we seem to be adding stuff here, I do wonder if new things should be marked as internal. @rbuckton probably knows better than me for this bit.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's fine for this to be public, as it is observable to custom transformers.

@dragomirtitian
Copy link
Copy Markdown
Contributor Author

@jakebailey This one would also ideally make it in before isolated declarations. It causes a failure in a test. Not critical but nice to have.

Comment thread src/compiler/types.ts
Unspecified, // Emitting an otherwise unspecified node
EmbeddedStatement, // Emitting an embedded statement
JsxAttributeValue, // Emitting a JSX attribute value
ImportTypeNodeAttributes,// Emitting attributes as part of an ImportTypeNode
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's fine for this to be public, as it is observable to custom transformers.

@rbuckton rbuckton merged commit fd9aba6 into microsoft:main Dec 8, 2023
c0sta pushed a commit to c0sta/TypeScript that referenced this pull request Dec 20, 2023
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Inferring return types with import attributes causes debug assertion.

5 participants