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

feat(ts): raise error for abstract property with initializer #13523

Merged
merged 6 commits into from Aug 3, 2021

Conversation

fedeci
Copy link
Member

@fedeci fedeci commented Jul 1, 2021

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

Raise an error for class abstract properties with initializer as specified in TS 4.4 beta announcement.

@fedeci fedeci added area: typescript pkg: parser PR: Spec Compliance 👓 A type of pull request used for our changelog categories labels Jul 1, 2021
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 1, 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 fb6bf4c:

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

@babel-bot
Copy link
Collaborator

babel-bot commented Jul 1, 2021

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

TSErrors.AbstractPropertyHasInitializer,
key.type === "Identifier"
? key.name
: `[${this.input.slice(key.start, key.end)}]`,
Copy link
Member

Choose a reason for hiding this comment

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

Can you also add a test for this case?

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! Let's keep this for the next minor, since it's technically a new feature (TS 4.4 support)

@nicolo-ribaudo nicolo-ribaudo added this to the v7.15.0 milestone Jul 2, 2021
@existentialism existentialism added the PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release label Jul 2, 2021
@nicolo-ribaudo nicolo-ribaudo merged commit c35637e into babel:main Aug 3, 2021
@fedeci fedeci deleted the no-abstract-prop-init branch August 3, 2021 21:56
@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 Nov 3, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 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: parser PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release PR: Spec Compliance 👓 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

5 participants