Skip to content

Commit a93f7ca

Browse files
neatbuschto
authored andcommitted
Added: "timeout" parameter to "RequestInit"
To remove TypeScript warning via concluded declaration file. Change-Id: I7be01417d69e1d5ad4bfa424bda7a47681362e97
1 parent 8045159 commit a93f7ca

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

doc/api/RequestInit.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@
5555
"only-if-cached"
5656
],
5757
"optional": true
58+
},
59+
"timeout": {
60+
"type": "number",
61+
"optional": true,
62+
"description": "The network request timeout in milliseconds"
5863
}
5964
}
60-
}
65+
}

test/typescript/Request.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ result.then((response) => {
1818

1919
let request: Request = new Request('input', {body: 'foo'});
2020
request = new Request('input', {body: new Blob()});
21-
request = new Request('input', {body: new FormData()});
21+
request = new Request('input', {body: new FormData(), timeout: 400});
2222
let fetchWithRequest: Promise<Response> = fetch(request);

0 commit comments

Comments
 (0)