Skip to content

3.0.3 seems to have incorrect typings #206

Open
@keeganwatkins

Description

@keeganwatkins

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.

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