Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/gossi/ember-command. Integrate your Business Logic with Ember gossi.github.io/ember-command
Something went wrong. Try again.
123456789101112131415161718192021222324252627import { Command } from 'ember-command';import { dropTask, timeout } from 'ember-concurrency';
interface Bag { carry: boolean;}
export default class TaskCommand extends Command { private bag: Bag;
constructor(bag: Bag) { super(); this.bag = bag; }
async execute() { await this.changeBagTask.perform(); }
// eslint-disable-next-line unicorn/consistent-function-scoping changeBagTask = dropTask(async () => { await timeout(250);
this.bag.carry = true; });}