From f336a8d182ad206cdf960e4303e84d4ea728d2cf Mon Sep 17 00:00:00 2001 From: Richie Bendall Date: Mon, 16 Dec 2019 00:35:42 +1300 Subject: [PATCH] feat: Add typings (#6) Signed-off-by: Richie Bendall --- blob.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 blob.d.ts diff --git a/blob.d.ts b/blob.d.ts new file mode 100644 index 0000000..d605c6f --- /dev/null +++ b/blob.d.ts @@ -0,0 +1,18 @@ +/// + +// /** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */ +declare interface FetchBlob extends Blob { + stream(): ReadableStream + text(): Promise + arrayBuffer(): Promise + toString(): "[object Blob]" + [Symbol.toStringTag]: "Blob" + +} + +declare const FetchBlob: { + prototype: FetchBlob + new(blobParts?: BlobPart[], options?: BlobPropertyBag): FetchBlob +}; + +export = FetchBlob;