Skip to content

useStore() type definition is missing parameter for storeKey. #1807

@DerAlbertCom

Description

@DerAlbertCom

Version

4.0.0-beta.4

Steps to reproduce

In the Vue4 type definition the useStore function is defined as

export function useStore<S = any>(): Store<S>;

but in the source you can provide a key, to enable more then one store in the application.

export function useStore (key = null) {

What is expected?

The type definition should match the function

What is actually happening?

It does not match ;) so only one store can be used with typescript

Metadata

Metadata

Assignees

No one assigned

    Labels

    typesRelated to typings only

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions