export const isPromise = (obj: any): obj is Promise => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; };