Home > @jview/utils > isPromise
isPromise() function
是否是 Promise 类型
Signature:
typescript
export declare function isPromise<T = unknown>(val: unknown): val is Promise<T>;
export declare function isPromise<T = unknown>(val: unknown): val is Promise<T>;
Parameters
Parameter | Type | Description |
---|---|---|
val | unknown |
Returns:
val is Promise<T>