Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Dec 8, 2023

Conversation

dragomirtitian
Copy link
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
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.

src/compiler/emitter.ts Outdated Show resolved Hide resolved
@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
src/compiler/emitter.ts Outdated Show resolved Hide resolved
src/compiler/emitter.ts Outdated Show resolved Hide resolved
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
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
Member

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.

@sandersn sandersn added this to Not started in PR Backlog Nov 27, 2023
@sandersn sandersn moved this from Not started to Waiting on reviewers in PR Backlog Nov 29, 2023
@dragomirtitian
Copy link
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.

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
Member

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.

PR Backlog automation moved this from Waiting on reviewers to Needs merge Dec 8, 2023
@rbuckton rbuckton merged commit fd9aba6 into microsoft:main Dec 8, 2023
19 checks passed
PR Backlog automation moved this from Needs merge to Done Dec 8, 2023
c0sta pushed a commit to c0sta/TypeScript that referenced this pull request Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
PR Backlog
  
Done
Development

Successfully merging this pull request may close these issues.

Inferring return types with import attributes causes debug assertion.
4 participants