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

historyContext: incomplete/outdated information #73

Open
jacquesg opened this issue Nov 15, 2022 · 2 comments
Open

historyContext: incomplete/outdated information #73

jacquesg opened this issue Nov 15, 2022 · 2 comments

Comments

@jacquesg
Copy link

historyContext does not return something that can be used with history.listen().

export function historyContext(
  rollbar: Rollbar,
  args: {
    formatter: (location: string, action: string) => string;
    filter: (location: string, action: string) => boolean;
  }
): (
  v4Location: {
    action: string;
    filter: (location: string, action: string) => boolean;
  },
  v4action: string
) => void;
@jacquesg
Copy link
Author

The documentation also states: "The signature is filter(location, action): Boolean where location is history.location and action is history.action."

However, from the above the location type is a string.

@jacquesg
Copy link
Author

The example usage: history.listen(historyContext(rollbar)); also doesn't work, as the args parameter is not optional.

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

No branches or pull requests

1 participant