Skip to content

Commit

Permalink
fix(spec): Make Response constructor parameters optional
Browse files Browse the repository at this point in the history
According to the fetch spec, all parameters of the Response constructor are optional:

- https://developer.mozilla.org/en-US/docs/Web/API/Response/Response
- https://fetch.spec.whatwg.org/#response-class
  • Loading branch information
niklaskorz authored and grantila committed Jan 29, 2019
1 parent c33f6ab commit 6c94589
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export class Response extends Body
public readonly httpVersion: HttpVersion;

constructor(
body: BodyTypes | Body | null,
init: Partial< ResponseInit >,
body: BodyTypes | Body | null = null,
init: Partial< ResponseInit > = { },
extra?: Partial< Extra >
)
{
Expand Down

0 comments on commit 6c94589

Please sign in to comment.