Skip to content

compile error on typescript@next #800

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

Closed
sandersn opened this issue Mar 5, 2020 · 0 comments · Fixed by #801
Closed

compile error on typescript@next #800

sandersn opened this issue Mar 5, 2020 · 0 comments · Fixed by #801

Comments

@sandersn
Copy link
Contributor

sandersn commented Mar 5, 2020

Version

3.0.0-alpha.7

Reproduction link

microsoft/TypeScript#37225 (comment)

Steps to reproduce

Upgrade to typescript@next, then run build or open packages/reactivity/src/collectionHandlers.ts:179 with your editor set to use the local version of typescript.

What is expected?

No compile error

What is actually happening?

Compile error: semantic error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters.


Typescript did not intend to allow 'this' parameters for accessors and wasn't checking them, but incorrectly allowed them until microsoft/TypeScript#36889. Discovered by Typescript's user test run: microsoft/TypeScript#37225 (comment)

sandersn added a commit to sandersn/vue-next that referenced this issue Mar 5, 2020
The next version of Typescript disallows 'this' parameter annotations on
accessors, which causes vue-next to fail to compile.

This PR removes the annotation and adds a cast instead.

Fixes vuejs#800
yyx990803 added a commit that referenced this issue Mar 5, 2020
The next version of Typescript disallows 'this' parameter annotations on
accessors, which causes vue-next to fail to compile.

This PR removes the annotation and adds a cast instead.

Fixes #800
jiangying000 added a commit to jiangying000/vue-next that referenced this issue Mar 7, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant