amis-rpc-design/node_modules/fork-ts-checker-webpack-plugin/lib/utils/async/controlled-promise.js

18 lines
475 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createControlledPromise = void 0;
function createControlledPromise() {
let resolve = () => undefined;
let reject = () => undefined;
const promise = new Promise((aResolve, aReject) => {
resolve = aResolve;
reject = aReject;
});
return {
promise,
resolve,
reject,
};
}
exports.createControlledPromise = createControlledPromise;