GuardsisPromiseisPromise CallableisPromise<T>(x: unknown): x is Promise<T>Checks if x is a Promise. ExampleisPromise(Promise.resolve(1))// => trueisPromise("foo")// => falseType parametersTParametersx: unknownThe value to check.Returns x is Promise<T>true if x is a Promise, false otherwise.
Checks if
x
is aPromise
.Example