diff --git a/declarations.d.ts b/declarations.d.ts index 91eb4ca7d..1e459b3a8 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -28,6 +28,34 @@ declare var console: Console; declare var global; declare var require; +//XMLHttpRequest-related +interface FormData { + append(name: any, value: any, blobName?: string): void; +} + +declare var FormData: { + prototype: FormData; + new (): FormData; +} + +interface Blob { + size: number; + type: string; + msClose(): void; + msDetachStream(): any; + slice(start?: number, end?: number, contentType?: string): Blob; +} + +declare var Blob: { + prototype: Blob; + new (blobParts?: any[], options?: BlobPropertyBag): Blob; +} + +interface BlobPropertyBag { + type?: string; + endings?: string; +} + // Global functions declare function Deprecated(target: Object, key?: string | symbol, value?: any): void; diff --git a/fetch/webidl.d.ts b/fetch/webidl.d.ts index 62bae8bca..eab04ca20 100644 --- a/fetch/webidl.d.ts +++ b/fetch/webidl.d.ts @@ -8,7 +8,4 @@ declare type USVString = string; declare type DOMString = string; // see: https://fetch.spec.whatwg.org/#headersinit -declare type OpenEndedDictionary = Object; - -declare class FormData { } -declare class Blob { } \ No newline at end of file +declare type OpenEndedDictionary = Object; \ No newline at end of file