Skip to content

Commit

Permalink
Make example build with TypeScript 4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Nov 25, 2021
1 parent b737c1d commit 547ccd4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions example/src/classes/CancellablePromise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,7 @@ export class CancellablePromise<T> {
* @returns A new `CancellablePromise`. Canceling it cancels all of the input
* promises.
*/
static race<T>(
values: readonly T[]
): CancellablePromise<T extends PromiseLike<infer U> ? U : T> {
static race<T>(values: readonly T[]): CancellablePromise<Awaited<T>> {
const cancel = (): void => {
for (const value of values) {
if (isPromiseWithCancel(value)) {
Expand Down

0 comments on commit 547ccd4

Please sign in to comment.