Skip to content

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

Merged
nicolo-ribaudo merged 6 commits intobabel:mainfrom
fedeci:no-abstract-prop-init
Aug 3, 2021
Merged

feat(ts): raise error for abstract property with initializer#13523
nicolo-ribaudo merged 6 commits intobabel:mainfrom
fedeci:no-abstract-prop-init

Conversation

@fedeci
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@fedeci fedeci force-pushed the no-abstract-prop-init branch from 0ced40d to 35db442 Compare July 3, 2021 11:41
@nicolo-ribaudo nicolo-ribaudo force-pushed the no-abstract-prop-init branch from 35db442 to 54732e9 Compare August 3, 2021 20:08
@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.

5 participants