Skip to content
This repository was archived by the owner on Jun 20, 2025. It is now read-only.
This repository was archived by the owner on Jun 20, 2025. It is now read-only.

connectToHistory typescript definition does not accept same arguments as the function. #63

@emerencia

Description

@emerencia

The exported typescript definition reads:

connectToHistory<H extends LooseHistory>(history: H): H;

But in react-router-piwik.js the function is defined as:

connectToHistory(history, trackAtConnect, callback)

I can supply those extra arguments and it works, but my IDE complains about a typescript mismatch:

2021-10-29_00-49-36

I think at some point the function got extra arguments and someone forgot to update the typescript exported definition?

I even think that if you call it with just one argument, it errors, because it tries to call that callback function (third argument).

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