import { ArrayWrapper } from './array'; import { MapWrapper } from './map'; import type { Pipe } from './lift'; export declare class ObjectWrapper { private _value; constructor(_value: T); private _isLiftWrapper; value(): T; private _clone; /** * Adds a new key/value to this object. This creates a new type. * To add a nullable key to an object while preserving its type, use "update()" instead. */ add(key: K, value: V): ObjectWrapper; /** * Returns whether this object contains no keys. */ isEmpty(): boolean; /** * Creates an Array of all this object's keys, in no particular order. * If the keys are a subtype of string, the Array will be typed with the proper key union type. */ keys(): ArrayWrapper>>; /** * Maps one of this Object values, by key. * This is similar to remove('key').add('key', newValue) but is less error prone. * This can change the type of the object. */ mapValue(key: K, mapFunction: (value: T[K]) => V): ObjectWrapper<{ [K2 in keyof T]: K2 extends K ? V : T[K2]; }>; /** * Maps this Object's values. * This is mostly useful for objects with a single value type. */ mapValues(mapFunction: (value: T[keyof T]) => V): ObjectWrapper>; pipe: typeof import("./lift").pipe; /** * Removes a key/value from this object and return a new object (and type) * To delete a (nullable) key from an object while preserving its type, use "update()" instead. */ remove(keyToRemove: K): ObjectWrapper>; /** * Creates an Array with all these object's values. */ values(): ArrayWrapper>; /** * Converts this Object to an Array of tuples. * Similar to Object.entries() but retains the type of keys. */ toArray(): ArrayWrapper<[KeyAsString, T[keyof T]][]>; /** * Transforms this Object to a Map where the keys are the string typed keys of this Object. */ toMap(): MapWrapper, T[keyof T], Map, T[keyof T]>>; } export declare function setObjectPipe(_pipe: Pipe): void; declare type KeyAsString = K extends string ? K : string; export {};