UNPKG

to-typed

Version:

Type-guards, casts and converts unknowns into typed values

16 lines (15 loc) 486 B
import { Collection } from "./types"; export declare class Utils { static mapLazy<S, C extends Collection<S> = Collection<S>>(container: C): <T>(map: (value: S, key: string) => T) => { [I in keyof C]: T; }; static mapEager<S, T, C extends Collection<S>>(container: C, map: (value: S, key: string) => T): { [I in keyof C]: T; }; static fromEntries<T>(entries: [ keyof any, T ][]): { [s: string]: T; }; }