Skip to content

Commit

Permalink
Update types
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jan 13, 2024
1 parent 6a2e5d2 commit 0696ed4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reactiveweb/src/ember-concurrency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ export function task<
>(context: object, task: LocalTask, thunk?: () => Args) {
assert(`Task does not have a perform method. Is it actually a task?`, 'perform' in task);

const state = new State(task);
const state = new State<Args, Return, LocalTask>(task);

let destroyable = resource(context, () => {
let args = thunk || DEFAULT_THUNK;

let positional = normalizeThunk(args).positional;
let positional = normalizeThunk(args).positional as Args;

state[RUN](positional || []);

Expand Down Expand Up @@ -171,7 +171,7 @@ export class State<Args extends any[], Return, LocalTask extends TaskIsh<Args, R
// getOwnPropertyDescriptor(target, key): PropertyDescriptor | undefined {
// return Reflect.getOwnPropertyDescriptor(target.value, key);
// },
}) as never as Instance;
});
}
// Set during setup/update
declare currentTask: TaskInstance<Return>;
Expand Down

0 comments on commit 0696ed4

Please sign in to comment.