Skip to content

isPromise

Functions

isPromise()

isPromise(val): val is Promise<any>

检测值是否是 Promise 类型

Parameters

ParameterTypeDescription
valany待检测值

Returns

val is Promise<any>