Skip to content

support TS 4.3 override syntax in class#1541

Merged
kdy1 merged 10 commits intoswc-project:masterfrom
g-plane:ts-4.3-override
Apr 6, 2021
Merged

support TS 4.3 override syntax in class#1541
kdy1 merged 10 commits intoswc-project:masterfrom
g-plane:ts-4.3-override

Conversation

@g-plane
Copy link
Copy Markdown
Contributor

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

@g-plane g-plane marked this pull request as draft April 5, 2021 03:47
@g-plane g-plane marked this pull request as ready for review April 5, 2021 04:15
@Skalman
Copy link
Copy Markdown

Skalman commented Apr 5, 2021

@g-plane, just wanted to double check one thing. I saw a commit message "disallow override to precede accessibilities". Not really sure what you mean, but does the following still work as expected?

class B {}

class C extends B {
    override private constructor() {
        super();
    }
}

TS playground

@g-plane
Copy link
Copy Markdown
Contributor Author

g-plane commented Apr 5, 2021

@g-plane
Copy link
Copy Markdown
Contributor Author

g-plane commented Apr 5, 2021

Let's see how TypeScript team answers: microsoft/TypeScript#43533 . If I'm wrong, I'll update this PR.

@kdy1 kdy1 added this to the v1.2.52 milestone Apr 6, 2021
@g-plane
Copy link
Copy Markdown
Contributor Author

g-plane commented Apr 6, 2021

As this PR of TypeScript: microsoft/TypeScript#43544 , accessibility modifiers must precede override, so there's no need to change in this PR, but maybe I need to add another check: microsoft/TypeScript#43533 (comment) .

@g-plane
Copy link
Copy Markdown
Contributor Author

g-plane commented Apr 6, 2021

microsoft/TypeScript#43533 is closed because microsoft/TypeScript#43544 is merged, so we can go ahead.

Copy link
Copy Markdown
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you a lot!

@kdy1 kdy1 enabled auto-merge (squash) April 6, 2021 15:10
@kdy1 kdy1 disabled auto-merge April 6, 2021 15:10
@kdy1 kdy1 enabled auto-merge (squash) April 6, 2021 15:11
@kdy1 kdy1 merged commit 3d0ad22 into swc-project:master Apr 6, 2021
@g-plane g-plane deleted the ts-4.3-override branch April 7, 2021 01:27
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants