Skip to content

Commit

Permalink
fix(types): better ember-concurrency@v1 support in typescript
Browse files Browse the repository at this point in the history
Issue: #297

Resolves this issue:
```
Argument of type 'TaskForAsyncTaskFunction<() => Promise<Food>>'
  is not assignable to parameter of type 'TaskIsh<Food, Data[]>'.

  The types returned by 'perform(...).cancel(...)' are incompatible between these types.
    Type 'void' is not assignable to type 'Promise<void>'.
```
  • Loading branch information
NullVoxPopuli committed Dec 5, 2021
1 parent 06bdf11 commit bf80294
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface TaskInstance<Return = unknown> extends Promise<Return> {
readonly isFinished: boolean;
readonly isRunning: boolean;
readonly isDropped: boolean;
cancel(reason?: string): Promise<void>;
cancel(reason?: string): void | Promise<void>;
}

// @private
Expand Down

0 comments on commit bf80294

Please sign in to comment.