You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
1.0 KiB

{"ast":null,"code":"import { Immediate } from '../util/Immediate';\nimport { AsyncAction } from './AsyncAction';\nexport class AsapAction extends AsyncAction {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n }\n\n requestAsyncId(scheduler, id, delay = 0) {\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n\n scheduler.actions.push(this);\n return scheduler.scheduled || (scheduler.scheduled = Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));\n }\n\n recycleAsyncId(scheduler, id, delay = 0) {\n if (delay !== null && delay > 0 || delay === null && this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n\n if (scheduler.actions.length === 0) {\n Immediate.clearImmediate(id);\n scheduler.scheduled = undefined;\n }\n\n return undefined;\n }\n\n} //# sourceMappingURL=AsapAction.js.map","map":null,"metadata":{},"sourceType":"module"}