Skip to content

Add TSClassImplements|TSInterfaceHeritage and rename TsExpressionWithTypeArguments in Babel 8#16731

Merged
nicolo-ribaudo merged 10 commits into
babel:mainfrom
liuxingbaoyu:TSClassImplements
Sep 17, 2024
Merged

Add TSClassImplements|TSInterfaceHeritage and rename TsExpressionWithTypeArguments in Babel 8#16731
nicolo-ribaudo merged 10 commits into
babel:mainfrom
liuxingbaoyu:TSClassImplements

Conversation

@liuxingbaoyu
Copy link
Copy Markdown
Member

@liuxingbaoyu liuxingbaoyu commented Aug 10, 2024

Q                       A
Fixed Issues? #16679
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link babel/website#3022
Any Dependency Changes?
License MIT

Since just renaming the AST in Babel 8 would require changing more of the test suite, I've added it in Babel 7 as well.

@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Aug 10, 2024

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

Comment thread packages/babel-parser/src/types.ts Outdated
Comment on lines +1732 to +1733
// TS uses "heritageClauses", but want this to resemble ClassBase.
extends?: TsExpressionWithTypeArguments[];
extends?: TSClassImplements[];
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.

There is something wrong here.

@liuxingbaoyu liuxingbaoyu marked this pull request as draft August 10, 2024 02:09
@liuxingbaoyu liuxingbaoyu changed the title Add TSClassImplements and rename TsExpressionWithTypeArguments in Babel 8 Add TSClassImplements|TSInterfaceHeritage and rename TsExpressionWithTypeArguments in Babel 8 Aug 31, 2024
@liuxingbaoyu liuxingbaoyu marked this pull request as ready for review August 31, 2024 09:13
Comment thread packages/babel-generator/src/generators/typescript.ts
@nicolo-ribaudo nicolo-ribaudo added this to the v8.0.0-beta milestone Sep 7, 2024
@liuxingbaoyu
Copy link
Copy Markdown
Member Author

liuxingbaoyu commented Sep 7, 2024

Although this adds a new AST in Babel 7, this won't be available until Babel 8, so we can probably merge it in a patch release.

@liuxingbaoyu liuxingbaoyu added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release pkg: generator pkg: parser area: typescript pkg: types labels Sep 7, 2024
@nicolo-ribaudo nicolo-ribaudo force-pushed the TSClassImplements branch 2 times, most recently from cf9c127 to da08dab Compare September 16, 2024 16:59
@nicolo-ribaudo
Copy link
Copy Markdown
Member

Although this adds a new AST in Babel 7, this won't be available until Babel 8, so we can probably merge it in a patch release.

I changed this PR to only expose it in @babel/types/@babel/traverse Babel 8.

@nicolo-ribaudo nicolo-ribaudo merged commit 611d958 into babel:main Sep 17, 2024
@JLHwung
Copy link
Copy Markdown
Contributor

JLHwung commented Dec 5, 2024

This is an AST breaking change, it should not have been merged without a docs PR. @liuxingbaoyu Could you open a docs PR?

@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 Mar 8, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 8, 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 pkg: generator pkg: parser pkg: types PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants