/* IMPORT */
import { noop } from './utils.js';
/* MAIN */
const makeNakedPromise = () => {
    let resolve = noop;
    let reject = noop;
    let resolved = false;
    let rejected = false;
    const promise = new Promise((res, rej) => {
        resolve = value => {
            resolved = true;
            return res(value);
        };
        reject = value => {
            rejected = true;
            return rej(value);
        };
    });
    const isPending = () => !resolved && !rejected;
    const isResolved = () => resolved;
    const isRejected = () => rejected;
    return { promise, resolve, reject, isPending, isResolved, isRejected };
};
/* EXPORT */
export default makeNakedPromise;
