Skip to content

TS: location.query is not defined in RouterState.location interface #381

@antokara

Description

@antokara

As described in #356,
the query prop was added to the location object but the typescript typings do not include it.

interface RouterState
https://github.com/supasate/connected-react-router/blob/master/index.d.ts#L25

now, technically, this is a problem with the history package's typings
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/history/index.d.ts#L29
which you use in your package.

I guess the solution might be to fix the history typings to include the query prop or
augment it to include the missing prop or even, completely provide your own location type.

Because I am not sure which approach you prefer to take, I didn't open an issue on the history repository or create a PR with a fix...

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