frontend/.pnpm-store/v3/files/60/e3fe31281110d9e590022195177ffc15533bf0d0ede0bb049cd7705c0ee51e7839e447888f244ba51ac67dccd939d7b48eda53e03e2c3c026c1d3578313466

9 lines
365 B
Plaintext

/**
* Tests to see if the object is an ES2015 (ES6) Promise
* @see {@link https://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects}
* @param value the object to test
*/
export function isPromise(value: any): value is PromiseLike<any> {
return !!value && typeof (<any>value).subscribe !== 'function' && typeof (value as any).then === 'function';
}