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

Incorrect types for push #802

Closed
TeoTN opened this issue Jun 11, 2020 · 1 comment
Closed

Incorrect types for push #802

TeoTN opened this issue Jun 11, 2020 · 1 comment

Comments

@TeoTN
Copy link

TeoTN commented Jun 11, 2020

It seems that history.push is typed incorrectly. I'm trying to pass the function as reference to redux-saga's call effect which causes an error:

const path: History.Path = ...;
yield call({ context: history, fn: history.push }, path);

The error is:

TS2769: No overload matches this call. Argument of type 'string' is not assignable to parameter of type 'LocationDescriptorObject<PoorMansUnknown>'.
@mjackson
Copy link
Member

It looks like you're using the types for version 4 which are maintained in https://github.com/DefinitelyTyped/DefinitelyTyped. You'll probably want to open an issue over there instead of here.

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

2 participants