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;