UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

13 lines 440 B
//#region src/map/internals/types.d.ts interface MapGuard<K, V, U extends V> { (value: NoInfer<V>, key: NoInfer<K>, target: ReadonlyMap<K, V>): value is U; } interface MapMap<K, V, U = V> { (value: NoInfer<V>, key: NoInfer<K>, target: ReadonlyMap<K, V>): U; } type MapPredicate<K, V> = MapMap<K, V, boolean>; interface OrElse<K, V, U> { (target: ReadonlyMap<K, V>): U; } //#endregion export { MapGuard, MapMap, MapPredicate, OrElse };