Skip to content

Typescript Errors #3

Closed
Closed
@Suruat

Description

@Suruat
  1. store: store as any shows me this message:

Argument of type '{ router: VueRouter; store: any; render: (h: CreateElement) => VNode; }' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>'.

Object literal may only specify known properties, and 'store' does not exist in type 'ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>'

  1. When I try to use mutations,
const setLastName = mapMutations(['setLastName']);
setLastName();`

last line (setLastName()) throws an error:

Cannot invoke an expression whose type lacks a call signature. Type '{ setFirstName: (payload?: string | undefined) => void; }' has no compatible call signatures.

Not sure, i it a problems with a package or I just using it wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions