/** * Types that unwrap (via `await` or `.then`) to {@typeparam T} * * @example An interface where functions are allowed to be asynchronous (`Promise`-returning), * but do not need to be */ export declare type Async = T | Promise | PromiseLike; export declare type Predicate = (value: T) => boolean; /** * Arrays with at least one element * * @warn Typescript ^4.1.3 allows you to pull off elements from empty arrays, even with strict mode enabled. * This utility mainly protects arguments to functions. * * @typeparam T The type of the first element * @typeparam U The type of the remaining elements, if different from {@typeparam T} */ export declare type NonEmptyArray = [T, ...U[]]; /** * {@typeparam T} if {@typeparam Bool}, else `never` */ export declare type TestedType = Bool extends true ? T : never;