TypeScript-DOM-lib-generator
TypeScript-DOM-lib-generator copied to clipboard
Consistently use Promise<void> instead of Promise<undefined>
lib.dom.d.ts ubiquitously uses Promise<void> for promises not resolving
to undefined. It has done this for a long time.
When the generator was written, there were 0 or 1 (I can't quite tell)
places where this type of promise occured outside of a function return
value. However, Web Streams are now widely supported, and they have
properties that are promises that resolve to no value. These are
currently typed as Promise<undefined>. This commit changes them to be
typed as Promise<void>, to align with the rest of lib.dom.d.ts.
There are 5 readonly properties that are impacted by this change.