馬老師游戲前端開發(fā)入門
const resolve = (data) => {
? ? ?this.#status = 'fulfilled';
? ? ?const f1f2 = this.queue.shift();
? ? ?if (!f1f2 || !f1f2[0]) return;
? ? ?const x = f1f2[0].call(undefined, data);
? ? ?if (x instanceof Promise2) {
? ? ? ?x.then(data => resolve(data), reason => reject(reason));
? ? ?} else {
? ? ? ?resolve(x);
? ? ?}
? ?}
標(biāo)簽: