📅  最后修改于: 2022-03-11 15:03:32.198000             🧑  作者: Mango
const p = new Promise(
function (resolve, reject) { // (A)
···
if (···) {
resolve(value); // success
} else {
reject(reason); // failure
}
});