vue icon indicating copy to clipboard operation
vue copied to clipboard

Vue 2.7.14 mapState throws error with strict enabled

Open Ignelio6666 opened this issue 2 years ago • 0 comments

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 avatar Dec 08 '22 10:12 Ignelio6666