Skip to content

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

Merged
Ron Buckton (rbuckton) merged 3 commits into
microsoft:mainfrom
bloomberg:emit-import-attributes-bug
Dec 8, 2023
Merged

ImportAttributes should go through the same emit phases when in an ImportTypeNode#56395
Ron Buckton (rbuckton) merged 3 commits into
microsoft:mainfrom
bloomberg:emit-import-attributes-bug

Conversation

@dragomirtitian

Copy link
Copy Markdown
Contributor

Fixes #56394

@typescript-bot 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
Contributor

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 Daniel Rosenwasser (@DanielRosenwasser) and Ryan Cavanaugh (@RyanCavanaugh) are aware of the changes, just as a heads up.

Comment thread src/compiler/emitter.ts Outdated
@typescript-bot 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. Ron Buckton (@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

Jake Bailey (@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
Ron Buckton (rbuckton) merged commit fd9aba6 into microsoft:main Dec 8, 2023
Gabriel Costa Moura (c0sta) pushed a commit to c0sta/TypeScript that referenced this pull request Dec 20, 2023
@microsoft 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