Skip to content

isPromise

@tsed/core

Usage ​

typescript
import { isPromise } from "@tsed/core";

See /packages/core/src/utils/isPromise.ts.

Overview ​

ts
function isPromise<T = any>(target: any): target is Promise<T>;

Description ​

Checks if a value is a Promise by verifying the then method exists and it's not an Observable.

Released under the MIT License.