Killing `Promise.fulfill`

Domenic Denicola domenic at
Wed Aug 21 19:04:57 PDT 2013

I am generally against sacrificing things for polyfillability. I'd rather say "if you're using this polyfill and need security guarantees, use `` (or `Q`, even); if you want forward-compatibility at the expense of security, use `Promise`."

Other options could involve using the module system. Indeed, all static methods could in theory move there. The default export even could be the coercer (like it is with Q today).

import { toPromise as Q, every, some, Promise } from "@promise"; // renaming to Q for brevity

// or maybe

import Q from "@promise";
import { every, some, Promise } from "@promise";

More information about the es-discuss mailing list