From 417f0d472117a181263677d0711ce428b87169de Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Fri, 10 Jul 2015 13:43:58 +0300 Subject: [PATCH] FormData & Blog moved to declarations --- declarations.d.ts | 28 ++++++++++++++++++++++++++++ fetch/webidl.d.ts | 5 +---- 2 files changed, 29 insertions(+), 4 deletions(-) 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