mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
isomorphic-fetch,whatwg-fetch: Add ArrayBuffer to BodyInit (#9387)
* isomorphic-fetch: whitespace
* isomorphic-fetch: Add ArrayBuffer{,View} to BodyInit
Relevant specs:
BodyInit: https://fetch.spec.whatwg.org/#bodyinit
BufferSource: https://heycam.github.io/webidl/#common-BufferSource
* whatwg-fetch: Add ArrayBuffer{,View} to BodyInit
Relevant specs:
BodyInit: https://fetch.spec.whatwg.org/#bodyinit
BufferSource: https://heycam.github.io/webidl/#common-BufferSource
This commit is contained in:
committed by
Masahiro Wakame
parent
4eb951c307
commit
587f9d9cb0
14
isomorphic-fetch/isomorphic-fetch.d.ts
vendored
14
isomorphic-fetch/isomorphic-fetch.d.ts
vendored
@@ -4,23 +4,23 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare enum RequestContext {
|
||||
"audio", "beacon", "cspreport", "download", "embed", "eventsource",
|
||||
"favicon", "fetch", "font", "form", "frame", "hyperlink", "iframe",
|
||||
"image", "imageset", "import", "internal", "location", "manifest",
|
||||
"object", "ping", "plugin", "prefetch", "script", "serviceworker",
|
||||
"audio", "beacon", "cspreport", "download", "embed", "eventsource",
|
||||
"favicon", "fetch", "font", "form", "frame", "hyperlink", "iframe",
|
||||
"image", "imageset", "import", "internal", "location", "manifest",
|
||||
"object", "ping", "plugin", "prefetch", "script", "serviceworker",
|
||||
"sharedworker", "subresource", "style", "track", "video", "worker",
|
||||
"xmlhttprequest", "xslt"
|
||||
}
|
||||
declare enum RequestMode { "same-origin", "no-cors", "cors" }
|
||||
declare enum RequestCredentials { "omit", "same-origin", "include" }
|
||||
declare enum RequestCache {
|
||||
"default", "no-store", "reload", "no-cache", "force-cache",
|
||||
declare enum RequestCache {
|
||||
"default", "no-store", "reload", "no-cache", "force-cache",
|
||||
"only-if-cached"
|
||||
}
|
||||
declare enum ResponseType { "basic", "cors", "default", "error", "opaque" }
|
||||
|
||||
declare type HeaderInit = Headers | Array<string>;
|
||||
declare type BodyInit = Blob | FormData | string;
|
||||
declare type BodyInit = ArrayBuffer | ArrayBufferView | Blob | FormData | string;
|
||||
declare type RequestInfo = Request | string;
|
||||
|
||||
interface RequestInit {
|
||||
|
||||
2
whatwg-fetch/whatwg-fetch.d.ts
vendored
2
whatwg-fetch/whatwg-fetch.d.ts
vendored
@@ -82,7 +82,7 @@ interface ResponseInit {
|
||||
}
|
||||
|
||||
declare type HeaderInit = Headers|Array<string>;
|
||||
declare type BodyInit = Blob|FormData|string;
|
||||
declare type BodyInit = ArrayBuffer|ArrayBufferView|Blob|FormData|string;
|
||||
declare type RequestInfo = Request|string;
|
||||
|
||||
interface Window {
|
||||
|
||||
Reference in New Issue
Block a user