Skip to content

Type checking is broken in Vue components when using mapping helpers #1119

Closed
@Demivan

Description

@Demivan

Version

3.0.1

Reproduction link

#1105

Steps to reproduce

  1. Create new Vue component.
  2. In jsconfig.json (tsconfig.json) enable strict mode and js checking
  3. Add mapState or mapActions to the component

What is expected?

Type checking should work.
Intellisense should suggest actions mapped using mapActions and suggest data mapped using mapState
image

What is actually happening?

Type checking stops working.
Intellisense is not suggesting mapped actions and state.
image


This is due to mapState and mapActions returning Dictionary<any>
I created pull request that fixes this for me: #1105

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttypesRelated to typings only

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions