Skip to content

Typescript: Location interface typing for query should include arrays #2182

Closed
@nowy

Description

@nowy

Version

3.0.1

Reproduction link

https://router.vuejs.org/en/essentials/navigation.html

Steps to reproduce

When programmatically navigating on vue router, pass through a dictionary with a param as an array. E.g.

{
  "foo": ["bar"]
}

What is expected?

Types are expected to work

What is actually happening?

In router.d.ts, the typing for query, under Location is set to:
Dictionary<string>.

This should be set to allow arrays too. Potentially numbers as well?

Metadata

Metadata

Assignees

No one assigned

    Labels

    TypescriptTypescript related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions