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 TypeScript 4.2 abstract constructor signatures #12628

Merged

Conversation

sosukesuzuki
Copy link
Member

@sosukesuzuki sosukesuzuki commented Jan 14, 2021

Q                       A
Fixed Issues? N/A
Minor: New Feature? Y
Tests Added + Pass? Yes
License MIT

https://devblogs.microsoft.com/typescript/announcing-typescript-4-2-beta/#abstract-construct-signatures

let Ctor: abstract new () => HasArea = Shape;

Extends TSConstructorType to add an abstract property

@babel-bot
Copy link
Collaborator

babel-bot commented Jan 14, 2021

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

@existentialism existentialism added area: typescript PR: New Feature 🚀 A type of pull request used for our changelog categories labels Jan 14, 2021
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 14, 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 d6c4d07:

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

@nicolo-ribaudo
Copy link
Member

Do you know it @typescript-eslint/parser will follow the same AST?

@sosukesuzuki
Copy link
Member Author

Do you know it @typescript-eslint/parser will follow the same AST?

No, I'll ask the maintainer of typescript-eslint

@nicolo-ribaudo nicolo-ribaudo added this to the v7.13.0 milestone Jan 14, 2021
@nicolo-ribaudo nicolo-ribaudo added the PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release label Jan 14, 2021
@sosukesuzuki
Copy link
Member Author

The new AST is fine with TSConstructorType and abstract: boolean property for typescript-eslint too (typescript-eslint/typescript-eslint#2935 (comment)).

@nicolo-ribaudo nicolo-ribaudo force-pushed the ts-4.2-abstract-consturctor-signature branch from 321d707 to c658d09 Compare February 21, 2021 16:48
This was referenced Mar 14, 2021
@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 May 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 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: New Feature 🚀 A type of pull request used for our changelog categories PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants