Skip to content

Commit f336a8d

Browse files
Richienbbitinn
authored andcommitted
feat: Add typings (#6)
Signed-off-by: Richie Bendall <[email protected]>
1 parent b09fdac commit f336a8d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

blob.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/// <reference lib="dom"/>
2+
3+
// /** 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. */
4+
declare interface FetchBlob extends Blob {
5+
stream(): ReadableStream
6+
text(): Promise<string>
7+
arrayBuffer(): Promise<ArrayBuffer>
8+
toString(): "[object Blob]"
9+
[Symbol.toStringTag]: "Blob"
10+
11+
}
12+
13+
declare const FetchBlob: {
14+
prototype: FetchBlob
15+
new(blobParts?: BlobPart[], options?: BlobPropertyBag): FetchBlob
16+
};
17+
18+
export = FetchBlob;

0 commit comments

Comments
 (0)