Skip to content

Commit 42e9c38

Browse files
committed
Change FileReader.readAsText‘s 2nd argument name
Change from `label` to the more descriptive `encoding` ([MDN docs][1]). [1]: https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsText
1 parent 9ac5280 commit 42e9c38

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

baselines/dom.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4987,7 +4987,7 @@ interface FileReader extends EventTarget {
49874987
readAsArrayBuffer(blob: Blob): void;
49884988
readAsBinaryString(blob: Blob): void;
49894989
readAsDataURL(blob: Blob): void;
4990-
readAsText(blob: Blob, label?: string): void;
4990+
readAsText(blob: Blob, encoding?: string): void;
49914991
readonly DONE: number;
49924992
readonly EMPTY: number;
49934993
readonly LOADING: number;

baselines/webworker.generated.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ interface FileReader extends EventTarget {
10741074
readAsArrayBuffer(blob: Blob): void;
10751075
readAsBinaryString(blob: Blob): void;
10761076
readAsDataURL(blob: Blob): void;
1077-
readAsText(blob: Blob, label?: string): void;
1077+
readAsText(blob: Blob, encoding?: string): void;
10781078
readonly DONE: number;
10791079
readonly EMPTY: number;
10801080
readonly LOADING: number;
@@ -1096,7 +1096,7 @@ interface FileReaderSync {
10961096
readAsArrayBuffer(blob: Blob): ArrayBuffer;
10971097
readAsBinaryString(blob: Blob): string;
10981098
readAsDataURL(blob: Blob): string;
1099-
readAsText(blob: Blob, label?: string): string;
1099+
readAsText(blob: Blob, encoding?: string): string;
11001100
}
11011101

11021102
declare var FileReaderSync: {

inputfiles/overridingTypes.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,6 +1825,29 @@
18251825
"type": "ProgressEvent"
18261826
}
18271827
]
1828+
},
1829+
"methods": {
1830+
"method": {
1831+
"readAsText": {
1832+
"name": "readAsText",
1833+
"override-signatures": [
1834+
"readAsText(blob: Blob, encoding?: string): void"
1835+
]
1836+
}
1837+
}
1838+
}
1839+
},
1840+
"FileReaderSync": {
1841+
"name": "FileReaderSync",
1842+
"methods": {
1843+
"method": {
1844+
"readAsText": {
1845+
"name": "readAsText",
1846+
"override-signatures": [
1847+
"readAsText(blob: Blob, encoding?: string): string"
1848+
]
1849+
}
1850+
}
18281851
}
18291852
},
18301853
"MediaList": {

0 commit comments

Comments
 (0)