TypeScript-DOM-lib-generator
TypeScript-DOM-lib-generator copied to clipboard
fix(dom): DOMRECTList index can return undefined
See https://drafts.fxtf.org/geometry-1/#domrectlist
Thanks for helping. This is a generated file, so you have to adjust the source.
The source that's here? https://github.com/microsoft/TSJS-lib-generator/blob/15a4678e0ef6de308e79451503e444e9949ee849/inputfiles/idl/Geometry%20Interfaces.widl#L79-L82 or something else?
Hrm, interesting - it's reasonable that the WIDL you posted should generate an undefined union.
It's quite possible that the WIDL->DTS does not add the | undefined here for the sake of convenience (like we don't force it on array index accessors ) -- it might need an explicit override in the big JSON file