diff --git a/src/index.ts b/src/index.ts index 95f3bd4..1e12ad6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -142,7 +142,7 @@ export default class AbortablePromise implements Promise { static deadlyRace( promises: AbortablePromise[], should_kill_others: (arg: L) => Promise = async () => true - ): Promise { + ): AbortablePromise { return new AbortablePromise(async function* (await_or_abort) { return await_or_abort( new Promise((resolve, _) => {