马老师游戏前端开发入门
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);
}
}