Skip to content

First argument to fetch is optional, but fetch requires at least 1 arg #528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5191,7 +5191,7 @@ interface GlobalEventHandlers {
}

interface GlobalFetch {
fetch(input?: Request | string, init?: RequestInit): Promise<Response>;
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
}

interface HTMLAllCollection {
Expand Down Expand Up @@ -16933,7 +16933,7 @@ declare var onwheel: ((this: Window, ev: WheelEvent) => any) | null;
declare var indexedDB: IDBFactory;
declare function atob(encodedString: string): string;
declare function btoa(rawString: string): string;
declare function fetch(input?: Request | string, init?: RequestInit): Promise<Response>;
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
declare var caches: CacheStorage;
declare var indexedDB: IDBFactory;
declare var origin: string;
Expand Down
4 changes: 2 additions & 2 deletions baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ declare var FormData: {
};

interface GlobalFetch {
fetch(input?: Request | string, init?: RequestInit): Promise<Response>;
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
}

interface Headers {
Expand Down Expand Up @@ -2674,7 +2674,7 @@ declare function importScripts(...urls: string[]): void;
declare function atob(encodedString: string): string;
declare function btoa(rawString: string): string;
declare var console: Console;
declare function fetch(input?: Request | string, init?: RequestInit): Promise<Response>;
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
declare var caches: CacheStorage;
declare var indexedDB: IDBFactory;
declare var origin: string;
Expand Down
13 changes: 13 additions & 0 deletions inputfiles/overridingTypes.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
{
"mixins": {
"mixin": {
"GlobalFetch": {
"name": "GlobalFetch",
"methods": {
"method": {
"fetch": {
"name": "fetch",
"override-signatures": [
"fetch(input: RequestInfo, init?: RequestInit): Promise<Response>"
]
}
}
}
},
"Animatable": {
"name": "Animatable",
"methods": {
Expand Down