types/w3c-web-usb: status properties are not undefined#73622
Conversation
According to the spec, the status properties on `USBInTransferResult` and `USBIsochronousInTransferPacket` are not optional and will always be present. - https://wicg.github.io/webusb/#usbintransferresult - https://wicg.github.io/webusb/#usbisochronousintransferpacket It is also logical that if the constructor argument cannot be undefined, then the property cannot be undefined.
|
🔔 @larsgk @thegecko @yume-chan — please review this PR in the next few days. Be sure to explicitly select |
| @@ -64,7 +64,7 @@ declare class USBAlternateInterface { | |||
| declare class USBInTransferResult { | |||
| constructor(status: USBTransferStatus, data?: DataView); | |||
| readonly data?: DataView | undefined; | |||
There was a problem hiding this comment.
Should this also be
| readonly data?: DataView | undefined; | |
| readonly data: DataView | null; |
Same on line 78
There was a problem hiding this comment.
The spec didn't say "nullable" on this one like it did on #73568, so that is why I didn't change it. I haven't had a chance to test on real hardware yet though to see what it actually does in a browser.
|
Re-ping @larsgk, @thegecko, @yume-chan: This PR has been out for over a week, yet I haven't seen any reviews. Could someone please give it some attention? Thanks! |
|
It has been more than two weeks and this PR still has no reviews. I'll bump it to the DT maintainer queue. Thank you for your patience, @dlech. (Ping @larsgk, @thegecko, @yume-chan.) |
|
@dlech: Everything looks good here. I am ready to merge this PR (at a64ea06) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@larsgk, @thegecko, @yume-chan: you can do this too.) |

According to the spec, the status properties on
USBInTransferResultandUSBIsochronousInTransferPacketare not optional and will always be present.It is also logical that if the constructor argument cannot be undefined, then the property cannot be undefined.
Please fill in this template.
pnpm test <package to test>.Select one of these and delete the others:
If changing an existing definition:
package.json.