Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13904,7 +13904,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3756,7 +3756,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3401,7 +3401,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13890,7 +13890,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.5/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3753,7 +3753,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.5/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3398,7 +3398,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.5/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4351,7 +4351,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.6/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13901,7 +13901,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.6/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3753,7 +3753,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.6/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3398,7 +3398,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.6/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4351,7 +4351,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.9/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13901,7 +13901,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.9/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3753,7 +3753,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.9/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3398,7 +3398,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.9/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4351,7 +4351,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
2 changes: 1 addition & 1 deletion baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4354,7 +4354,7 @@ interface FileReader extends EventTarget {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState)
*/
readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE;
readonly readyState: 0 | 1 | 2;
/**
* The **`result`** read-only property of the FileReader interface returns the file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
*
Expand Down
22 changes: 0 additions & 22 deletions inputfiles/addedTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -803,28 +803,6 @@
}
]
}
},
"FileSystemFileHandle": {
"properties": {
"property": {
"kind": {
"name": "kind",
"readonly": true,
"overrideType": "\"file\""
}
}
}
},
"FileSystemDirectoryHandle": {
"properties": {
"property": {
"kind": {
"name": "kind",
"readonly": true,
"overrideType": "\"directory\""
}
}
}
}
}
},
Expand Down
38 changes: 0 additions & 38 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -1976,44 +1976,6 @@
]
}
},
"FileReader": {
"events": {
"event": [
{
"name": "loadstart",
"type": "ProgressEvent"
},
{
"name": "progress",
"type": "ProgressEvent"
},
{
"name": "load",
"type": "ProgressEvent"
},
{
"name": "abort",
"type": "ProgressEvent"
},
{
"name": "error",
"type": "ProgressEvent"
},
{
"name": "loadend",
"type": "ProgressEvent"
}
]
},
"properties": {
"property": {
"readyState": {
"name": "readyState",
"overrideType": "typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE"
}
}
}
},
"FileSystemDirectoryHandle": {
"iterator": {
// It's true that Blink is the only supported engine for Symbol.asyncIterator,
Expand Down
10 changes: 10 additions & 0 deletions inputfiles/patches/file-api.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
interface FileReader {
event loadstart type=ProgressEvent
event progress type=ProgressEvent
event load type=ProgressEvent
event abort type=ProgressEvent
event error type=ProgressEvent
event loadend type=ProgressEvent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a mixed feeling of event types not being in events.kdl, but I guess this is fine.


property readyState overrideType="0 | 1 | 2"
}
7 changes: 7 additions & 0 deletions inputfiles/patches/file-system.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
interface FileSystemFileHandle {
property kind readonly=#true overrideType="\"file\""
}

interface FileSystemDirectoryHandle {
property kind readonly=#true overrideType="\"directory\""
}
1 change: 1 addition & 0 deletions src/build/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ function handleProperty(child: Node): Partial<Property> {
...optionalMember("optional", "boolean", child.properties?.optional),
...optionalMember("overrideType", "string", child.properties?.overrideType),
...optionalMember("type", "string", child.properties?.type),
...optionalMember("readonly", "boolean", child.properties?.readonly),
};
}

Expand Down
Loading