import { ValidationException } from './ValidationException'; /** * Is the value a generator function? * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction * * @example * ```ts * isGeneratorFunction(function* () { yield 'a' }) // true * isGeneratorFunction(() => 'a') // false * ``` * * @param value the value to check * @returns a boolean indicating whether the value is the expected type */ export declare const isGeneratorFunction: (value: unknown) => value is Function; /** * Validate that the value is a generator function. * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction * * @example * ```ts * validateGeneratorFunction(function* () { yield 'a' }) // null * validateGeneratorFunction(() => '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 validateGeneratorFunction: (value: unknown) => ValidationException | null; /** * Assert that the value is a generator function. * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction * * @example * ```ts * assertGeneratorFunction(function* () { yield 'a' }) // void * assertGeneratorFunction(() => 'a') // throws AssertionException * ``` * * @param value the value to check * @throws an `AssertionException` if the value is not the expected type */ export declare const assertGeneratorFunction: (value: unknown) => asserts value is Function;