Skip to content

Commit 08b1023

Browse files
committed
Update FileLike.stream() typings once again and add documentation for FileLike fields.
1 parent c9607ed commit 08b1023

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

lib/FileLike.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
export interface FileLike {
2+
/**
3+
* Name of the file referenced by the File object.
4+
*/
25
name: string
36

7+
/**
8+
* Returns the media type ([`MIME`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)) of the file represented by a `File` object.
9+
*/
410
type: string
511

12+
/**
13+
* Size of the file parts in bytes
14+
*/
615
size: number
716

17+
/**
18+
* The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
19+
*/
820
lastModified: number
921

10-
stream(): {[Symbol.asyncIterator](): AsyncIterator<Uint8Array>}
22+
/**
23+
* Returns a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) which upon reading returns the data contained within the [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File).
24+
*/
25+
stream(): AsyncIterable<Uint8Array>
1126

1227
[Symbol.toStringTag]: string
1328
}

0 commit comments

Comments
 (0)