Function unsuspended_map

  • Parameters

    • func: any

    Returns ((...args) => any)

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    Deprecated

    See obtain_map. Scheduled for removal in June 2027.

    Immediately returns a map equal to that eventually obtained by the given async function.

    Example

    const map = unsuspended_map(async () => {
    await timeout(1000);
    return map(() => {
    if (input === undefined) {
    return "foo";
    }
    });
    });

    console.log(await map()); // "foo"

Generated using TypeDoc