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

Fix Promise.all/allSettled/race/some/any #140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 8, 2022

  1. Fix Promise.all/allSettled/race/some/any

    - `all` no longer accepts non-promises in the input array
    - `allSettled` now preserves array/tuple length where possible
    - `some` can take in a positive, non-decimal numeric literal type and convert it to a tuple of the right length.
    - `all`/`allSettled`/`race`/`some`/`any` now all:
      - accept readonly arrays, since these methods don't mutate in-place
      - accept arrays with different Promise types in them, e.g. `[Promise<number>, Promise<string>]` now works
    - for `race`/`any`, we transform `[Promise<number>, Promise<string>]` into `Promise<number | string>` rather than `Promise<number> | Promise<string>`. For `some` it is the same but an array: `Promise<(number | string)[]>`
    Validark authored Aug 8, 2022
    Configuration menu
    Copy the full SHA
    cedfdc2 View commit details
    Browse the repository at this point in the history
  2. Prettier fix

    Validark authored Aug 8, 2022
    Configuration menu
    Copy the full SHA
    fd6902c View commit details
    Browse the repository at this point in the history