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

support TS 4.3 override syntax in class #13097

Merged
merged 13 commits into from Apr 7, 2021
Merged

support TS 4.3 override syntax in class #13097

merged 13 commits into from Apr 7, 2021

Conversation

g-plane
Copy link
Contributor

@g-plane g-plane commented Apr 3, 2021

Q                       A
Minor: New Feature? Yes
Tests Added + Pass? Yes
License MIT

Reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-3-beta/#override-and-the-noimplicitoverride-flag

@babel-bot
Copy link
Collaborator

babel-bot commented Apr 3, 2021

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 3, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ef33203:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Apr 3, 2021

Thanks for the PR! However, existentialism is already working on this 😅

@g-plane
Copy link
Contributor Author

g-plane commented Apr 3, 2021

I think we can improve this PR, because it seems that he hasn't submitted any PRs yet.

@existentialism
Copy link
Member

existentialism commented Apr 6, 2021

Totally missed this, I'm fine with letting you finish the PR!

@g-plane can you rebase on feat-7.14.0/parser-updates please?

Couple notes:

@existentialism existentialism mentioned this pull request Apr 6, 2021
9 tasks
@g-plane g-plane changed the base branch from main to feat-7.14.0/parser-updates April 6, 2021 15:21
@g-plane
Copy link
Contributor Author

g-plane commented Apr 6, 2021

I will address the rest problems after #13096 getting merged, then we can share some error messages.

@g-plane
Copy link
Contributor Author

g-plane commented Apr 7, 2021

All problems should be addressed.

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Thanks! Can you just add one more test for class ... { override [x] = 2 } and class ... { override [x]() {} }, as mentioned by @existentialism at #13097 (comment)?

packages/babel-parser/src/plugins/typescript/index.js Outdated Show resolved Hide resolved
Copy link
Member

@existentialism existentialism left a comment

Choose a reason for hiding this comment

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

Nice work!

@nicolo-ribaudo nicolo-ribaudo merged commit 9571427 into babel:feat-7.14.0/parser-updates Apr 7, 2021
@g-plane g-plane deleted the ts-4.3-override branch April 8, 2021 01:10
nicolo-ribaudo pushed a commit that referenced this pull request Apr 9, 2021
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
nicolo-ribaudo pushed a commit that referenced this pull request Apr 13, 2021
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
JLHwung added a commit that referenced this pull request Apr 16, 2021
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
JLHwung pushed a commit that referenced this pull request Apr 17, 2021
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
JLHwung pushed a commit that referenced this pull request Apr 19, 2021
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
@DanielRosenwasser
Copy link
Member

Just as a heads up, we added a specific order for override here: microsoft/TypeScript#43660

nicolo-ribaudo pushed a commit that referenced this pull request Apr 20, 2021
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
nicolo-ribaudo pushed a commit that referenced this pull request Apr 22, 2021
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
nicolo-ribaudo pushed a commit that referenced this pull request Apr 23, 2021
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
nicolo-ribaudo pushed a commit that referenced this pull request Apr 26, 2021
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
nicolo-ribaudo pushed a commit that referenced this pull request Apr 28, 2021
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
@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 Jul 20, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 20, 2021
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 PR: New Feature 🚀 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants