Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: Class reference in type throws error#16816

Merged
nicolo-ribaudo merged 2 commits into
babel:mainfrom
liuxingbaoyu:fix-tdz-in-type
Mar 21, 2025
Merged

fix: Class reference in type throws error#16816
nicolo-ribaudo merged 2 commits into
babel:mainfrom
liuxingbaoyu:fix-tdz-in-type

Conversation

@liuxingbaoyu

Copy link
Copy Markdown
Member
Q                       A
Fixed Issues? Fixes #16671
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass?
Documentation PR Link
Any Dependency Changes?
License MIT

@liuxingbaoyu liuxingbaoyu added PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Decorators area: typescript labels Sep 7, 2024
@babel-bot

babel-bot commented Sep 7, 2024

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/58864


const classFieldDefinitionEvaluationTDZVisitor: Visitor<HandleClassTDZState> = {
ReferencedIdentifier: handleClassTDZ,
"TSTypeReference|TSExpressionWithTypeArguments|TSTypeQuery|TSQualifiedName"(

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.

Can we skip on "TSType" so we are sure we never forget to update this list?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The difference is whether or not the TSQualifiedName is included, I'm not sure if that has any impact.🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I realized we just need to use TSTypeAnnotation. :)

@nicolo-ribaudo nicolo-ribaudo merged commit b1c4e7b into babel:main Mar 21, 2025
@github-actions github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jun 21, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Decorators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Type in property decorator causes error

4 participants