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

3.0.3 seems to have incorrect typings #206

Open
keeganwatkins opened this issue Jun 25, 2021 · 1 comment
Open

3.0.3 seems to have incorrect typings #206

keeganwatkins opened this issue Jun 25, 2021 · 1 comment

Comments

@keeganwatkins
Copy link
Contributor

keeganwatkins commented Jun 25, 2021

The types include this definition:

// Truncated for brevity
export interface FetchMock {
  (input?: string | Request, init?: RequestInit): Promise<Response>;
}

but in the spec, input cannot be undefined.

In Chrome, fetch() (invoked without arguments) produces a TypeError:

Failed to execute 'fetch' on 'Window': 1 argument required, but only 0 present.
@keeganwatkins
Copy link
Contributor Author

I took a pass at resolving this in #207, I've not contributed to this project before so please let me know what I can do to help 😄

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