Skip to content

Commit a17fb55

Browse files
committed
Various fixes for typings.
1 parent 230fef4 commit a17fb55

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/FileLike.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ export interface FileLike {
22
/**
33
* Name of the file referenced by the File object.
44
*/
5-
name: string
5+
readonly name: string
66

77
/**
88
* 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.
99
*/
10-
type: string
10+
readonly type: string
1111

1212
/**
1313
* Size of the file parts in bytes
1414
*/
15-
size: number
15+
readonly size: number
1616

1717
/**
1818
* 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.
1919
*/
20-
lastModified: number
20+
readonly lastModified: number
2121

2222
/**
2323
* 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).
2424
*/
2525
stream(): AsyncIterable<Uint8Array>
2626

27-
[Symbol.toStringTag]: string
27+
readonly [Symbol.toStringTag]: string
2828
}

lib/FormDataLike.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ export interface FormDataLike {
4242
*/
4343
[Symbol.iterator](): Generator<[string, FormDataEntryValue]>
4444

45-
[Symbol.toStringTag]: string
45+
readonly [Symbol.toStringTag]: string
4646
}

0 commit comments

Comments
 (0)