UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

13 lines 449 B
//#region src/array/internals/types.d.ts interface ArrayGuard<T, U extends T> { (value: NoInfer<T>, index: number, target: readonly NoInfer<T>[]): value is U; } interface ArrayMap<T, U = T> { (value: NoInfer<T>, index: number, target: readonly NoInfer<T>[]): U; } type ArrayPredicate<T> = ArrayMap<T, boolean>; interface OrElse<T, U> { (target: readonly NoInfer<T>[]): U; } //#endregion export { ArrayGuard, ArrayMap, ArrayPredicate, OrElse };