fix: Better use of @ts-expect-error (#6038)

This commit is contained in:
Kitson Kelly 2020-06-02 14:24:44 +10:00 committed by GitHub
parent 8b1b4766a1
commit 3fe6bc1b82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 152 additions and 145 deletions

View file

@ -187,7 +187,7 @@ function sendFetchReq(
}
export async function fetch(
input: domTypes.Request | URL | string,
input: (domTypes.Request & { _bodySource?: unknown }) | URL | string,
init?: domTypes.RequestInit
): Promise<Response> {
let url: string;
@ -285,7 +285,6 @@ export async function fetch(
method = input.method;
headers = input.headers;
//@ts-expect-error
if (input._bodySource) {
body = new DataView(await input.arrayBuffer());
}