Blame view

天文台pc/tianwentai-ui/node_modules/@react-dnd/asap/dist/TaskFactory.js 422 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  import { RawTask } from './RawTask.js';
  export class TaskFactory {
      create(task) {
          const tasks = this.freeTasks;
          const t1 = tasks.length ? tasks.pop() : new RawTask(this.onError, (t)=>tasks[tasks.length] = t
          );
          t1.task = task;
          return t1;
      }
      constructor(onError){
          this.onError = onError;
          this.freeTasks = [];
      }
  }
  
  //# sourceMappingURL=TaskFactory.js.map