Skip to content

Commit

Permalink
fixed type errors in a way which is looser, but definitely backwasrd …
Browse files Browse the repository at this point in the history
…compatible
  • Loading branch information
wheresrhys committed Nov 21, 2020
1 parent 0ef1210 commit 7da2226
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions types/index.d.ts
Expand Up @@ -645,9 +645,11 @@ declare namespace fetchMock {
* implementation.
*/
Promise?: new (executor: (
resolve: (value: Response | PromiseLike<Response>) => void,
reject: () => void,
) => void) => Promise<Response>;
// Should be (value?: T | PromiseLike<T>) => void
// But not sure if that's compatible with older typescript
resolve: (value?: any) => void,
reject: (value?: any) => void,
) => void) => Promise<any>;

/**
* Reference to a custom fetch implementation.
Expand Down

0 comments on commit 7da2226

Please sign in to comment.