Skip to content

Commit

Permalink
refactor: clean up task() return type
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescdavis committed Jun 20, 2020
1 parent 78a8d03 commit ee8b9f6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions addon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,11 @@ export function task(
| [TaskFunction]
| [EncapsulatedTask]
):
| PropertyDecorator // needed for overload compatibility
| TaskFunction
| EncapsulatedTask
| PropertyDescriptor
| void
// It doesn't *actuallly* ever return these, but they're needed for compatibility with the overloads.
| PropertyDecorator
| Task<unknown, unknown[]> {
| void {
const [argument1, argument2, argument3] = args;
if (isTaskFunction(argument1) || isEncapsulatedTask(argument1)) {
return argument1;
Expand Down

0 comments on commit ee8b9f6

Please sign in to comment.