UNPKG

@pwc-ra/components

Version:

PwC RA shared components library

10 lines (8 loc) 236 B
import { isFunction } from "./isFunction"; /** * Tests to see if the object is "thennable". * @param value the object to test */ export function isPromise(value: any): value is PromiseLike<any> { return isFunction(value?.then); }