import { ValidationException } from './ValidationException'; /** * Is the value a promise? * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise * * @example * ```ts * isPromise(Promise.resolve(a)) // true * isPromise(() => 'a') // false * ``` * * @param value the value to check * @returns a boolean indicating whether the value is the expected type */ export declare const isPromise: (value: unknown | Promise) => value is Promise; /** * Validate that the value is a promise. * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise * * @example * ```ts * validatePromise(Promise.resolve(a)) // null * validatePromise(() => 'a') // ValidationException * ``` * * @param value the value to check * @returns `null` if the value is the expected type or a `ValidationException` * if not */ export declare const validatePromise: (value: unknown) => ValidationException | null; /** * Assert that the value is a promise. * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise * * @example * ```ts * assertPromise(Promise.resolve(a)) // void * assertPromise(() => 'a') // throws AssertionException * ``` * * @param value the value to check * @throws an `AssertionException` if the value is not the expected type */ export declare const assertPromise: (value: unknown | Promise) => asserts value is Promise;