Skip to content
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

Consistently use Promise<void> instead of Promise<undefined> #1598

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jul 19, 2023

  1. 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.
    lucacasonato committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    a6be967 View commit details
    Browse the repository at this point in the history