export function isPromise ( obj ) { return ( ! ! obj && ( typeof obj === "object" || typeof obj === "function" ) && typeof obj . then === "function" ) ; } let promise = Promise ; export function get ( ) { return promise ; } export function set ( lib ) { if ( typeof lib !== "function" ) { throw new Error ( `Provided Promise must be a function, got ${ lib }` ) ; } promise = lib as PromiseConstructor ; }