Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The type definition of Route seems to be partially wrong #3566

Open
dora-gt opened this issue Jun 9, 2021 · 1 comment
Open

The type definition of Route seems to be partially wrong #3566

dora-gt opened this issue Jun 9, 2021 · 1 comment

Comments

@dora-gt
Copy link

@dora-gt dora-gt commented Jun 9, 2021

Version

3.5.1

Reproduction link

https://github.com/vuejs/vue-router/blob/dev/types/router.d.ts#L203

Steps to reproduce

None, just the source code seems to be wrong.

What is expected?

The type definition of Route#query should be

query: Dictionary<string | null | (string | null)[]>

The current implementation cannot express this type of query

/path?foo#bar

as it doesn't have any value and it is not converted to an array.

What is actually happening?

https://github.com/vuejs/vue-router/blob/dev/types/router.d.ts#L203

The type definition of Route#query is

query: Dictionary<string | (string | null)[]>
izabela-grzeskowiak-allegro added a commit to izabela-grzeskowiak-allegro/vue-router that referenced this issue Oct 15, 2021
@izabela-grzeskowiak-allegro

#3647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants