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

Vue 2.7.14 mapState throws error with strict enabled #12896

Open
Ignelio6666 opened this issue Dec 8, 2022 · 0 comments
Open

Vue 2.7.14 mapState throws error with strict enabled #12896

Ignelio6666 opened this issue Dec 8, 2022 · 0 comments

Comments

@Ignelio6666
Copy link

Ignelio6666 commented Dec 8, 2022

Version

2.7.14

Reproduction link

issue_repo

Steps to reproduce

If you enable strict in tsconfig - compiler will throw "overload" errors, when you disable it - mapState works, but then methods will throw "Property 'xxx' does not exist on type 'Vue3Instance" error. As we tested "under the hood" strictFunctionTypes causes these errors.

Versions:
node: v14.19.1
npm: 6.14.16

strict = false (method)
image

strict = true (mapState)
image

What is expected?

mapState would work without errors when strict is enabled.

What is actually happening?

It throws ts errors.

@Ignelio6666 Ignelio6666 changed the title Vue 2.7.14 mapState types doesn't work with strict enabled Vue 2.7.14 mapState throws error with strict enabled Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant