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:
Tamir Duberstein
2016-05-24 10:20:46 -04:00
committed by Masahiro Wakame
parent 4eb951c307
commit 587f9d9cb0
2 changed files with 8 additions and 8 deletions

View File

@@ -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 {

View File

@@ -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 {