-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating added types for ReadableStreamReadDoneResult
#1676
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1288,6 +1288,23 @@ | |
} | ||
}, | ||
"ReadableStreamReadDoneResult": { | ||
"name": "ReadableStreamReadDoneResult", | ||
"members": { | ||
"member": { | ||
"done": { | ||
"name": "done", | ||
"overrideType": "true", | ||
"required": true | ||
}, | ||
"value": { | ||
"name": "value", | ||
"overrideType": "undefined", | ||
"required": true | ||
} | ||
} | ||
} | ||
}, | ||
"ReadableStreamBYOBReadDoneResult": { | ||
"name": "ReadableStreamReadDoneResult", | ||
"typeParameters": [ | ||
{ | ||
|
@@ -1303,7 +1320,8 @@ | |
}, | ||
"value": { | ||
"name": "value", | ||
"overrideType": "T" | ||
"overrideType": "T", | ||
"required": true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so, the spec is pretty clear that the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's for default readers. For BYOB readers, the spec is at https://streams.spec.whatwg.org/#byob-reader-read. But still, that doesn't explain where
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right. Reading the spec you've linked to, it seems pretty explicit (list item 9) that the |
||
} | ||
} | ||
} | ||
|
@@ -1521,7 +1539,7 @@ | |
] | ||
}, | ||
{ | ||
"name": "ReadableStreamReadResult", | ||
"name": "ReadableStreamDefaultReadResult", | ||
"typeParameters": [ | ||
{ | ||
"name": "T" | ||
|
@@ -1532,10 +1550,44 @@ | |
"type": "ReadableStreamReadValueResult" | ||
}, | ||
{ | ||
"type": "ReadableStreamReadDoneResult" | ||
"type": "ReadableStreamDefaultReadDoneResult" | ||
} | ||
], | ||
"overrideType": "ReadableStreamReadValueResult<T> | ReadableStreamDefaultReadDoneResult" | ||
}, | ||
{ | ||
"name": "ReadableStreamBYOBReadResult", | ||
"typeParameters": [ | ||
{ | ||
"name": "T" | ||
} | ||
], | ||
"type": [ | ||
{ | ||
"type": "ReadableStreamReadValueResult" | ||
}, | ||
{ | ||
"type": "ReadableStreamBYOBReadDoneResult" | ||
} | ||
], | ||
"overrideType": "ReadableStreamReadValueResult<T> | ReadableStreamBYOBReadDoneResult<T>" | ||
}, | ||
{ | ||
"name": "ReadableStreamReadResult", | ||
"typeParameters": [ | ||
{ | ||
"name": "T" | ||
} | ||
], | ||
"type": [ | ||
{ | ||
"type": "ReadableStreamDefaultReadResult" | ||
}, | ||
{ | ||
"type": "ReadableStreamBYOBReadResult" | ||
} | ||
], | ||
"overrideType": "ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>" | ||
"overrideType": "ReadableStreamDefaultReadResult<T> | ReadableStreamBYOBReadResult<T>" | ||
}, | ||
{ | ||
"name": "EventListenerOrEventListenerObject", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReadableStreamBYOBReadDoneResult.value
should beT | undefined
, as per spec:See also: Deno and web-streams-polyfill.