We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
export function allP<T>(iterable: Iterable<T>): Promise<T[]>;
should most likely be:
export function allP<T>(iterable: Iterable<Promise<T>>): Promise<T[]>;
The text was updated successfully, but these errors were encountered:
Hi @mendrik,
I wouldn't say so. Here are the tests for allP:
allP
RA.allP([1, 2]); // $ExpectType Promise<number[]> RA.allP([Promise.resolve(1), Promise.resolve(2)]); // $ExpectType Promise<number[]> RA.allP(['a', 'b']); // $ExpectType Promise<string[]> RA.allP([1, 'a']); // $ExpectType Promise<(string | number)[]> RA.allP([]); // $ExpectType Promise<never[]> RA.allP(customIterable); // $ExpectType Promise<number[]> RA.allP('abc'); // $ExpectType Promise<string[]> // @ts-expect-error RA.allP({}); // @ts-expect-error RA.allP(1);
Sorry, something went wrong.
not really, your 2nd test is not right, it passes but if you check the type manually you get this:
No branches or pull requests
Describe the bug
export function allP<T>(iterable: Iterable<T>): Promise<T[]>;
should most likely be:
export function allP<T>(iterable: Iterable<Promise<T>>): Promise<T[]>;
The text was updated successfully, but these errors were encountered: