import { IfAny } from '../types/utils'; /** Creates an object from an array with the given key and value getters. */ export declare function createObjectFromArray(array: TElement[], keyGetter: (element: TElement) => TKey, valueGetter: (element: TElement) => TValue): Record; /** Creates an object from an array with the given key getter where the value equals the respective element. */ export declare function createObjectFromArray(array: TElement[], keyGetter: (element: TElement) => TKey): Record; /** Creates a new object from the given object by rewriting values. */ export declare function createObjectFromObject(obj: Record>, valueGetter: (value: Exclude, key: TKey) => TNewValue): Record; /** Creates a new object from the given object by rewriting values. */ export declare function createObjectFromObject(obj: Partial>, valueGetter: (value: TOldValue, key: TKey) => TNewValue): Partial>; /** Creates a new object from the given object by rewriting keys and values. */ export declare function createObjectFromObject(obj: Partial>, valueGetter: (value: TOldValue, key: TOldKey) => TNewValue, keyGetter: (key: TOldKey) => TNewKey): Partial>; /** Produces a test function to check if a value is of a given type. */ export declare function typePredicate(f: (value: T) => boolean): (value: T) => value is U; /** * Throws an error when called. * Used to mark code that must not be executed. */ export declare function unexpected(x: never): never; /** * Creates a type expector method. * Its first argument is the value to test. * The second argument must be true. * The assertion fails if one of T and U is "any" but not both or if U does not extend T. */ export declare const expectType: () => (_value: U, _shouldMatch: IfAny, IfAny>) => void; export declare const nameOf: () => (field: TField) => TField; export declare function isDefined(value: T): value is Exclude; export declare function assertIsDefined(value: T, errorMessage: string): asserts value is Exclude;