export function isPromise (thing: any): thing is Promise { if (thing == null) { return false } return typeof thing.then === 'function' && typeof thing.catch === 'function' && typeof thing.finally === 'function' }