We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c985f4 + c865ee8 commit 16134c1Copy full SHA for 16134c1
whatwg-fetch/whatwg-fetch-tests.ts
@@ -39,6 +39,13 @@ function test_fetchUrlWithRequestObject() {
39
handlePromise(window.fetch(request));
40
}
41
42
+function test_globalFetchVar() {
43
+ fetch('http://test.com', {})
44
+ .then(response => {
45
+ // for test only
46
+ });
47
+}
48
+
49
function handlePromise(promise: Promise<Response>) {
50
promise.then((response) => {
51
if (response.type === 'basic') {
whatwg-fetch/whatwg-fetch.d.ts
@@ -83,3 +83,5 @@ declare type RequestInfo = Request|string;
83
interface Window {
84
fetch(url: string|Request, init?: RequestInit): Promise<Response>;
85
86
87
+declare var fetch: typeof window.fetch;
0 commit comments