import { ExcludeNone, FromEntries, ObjectFromKeyValueArrays, ObjectKey, ReadonlyDeep, TryIndex } from "./Util" declare namespace SiftDictionary { export function copy(dictionary: T): T export function copyDeep(dictionary: T): T export function count( dictionary: T, predicate?: (value: T[K], key: K, dictionary: T) => unknown ): number export function entries( dictionary: T ): [K, T[K]][] export function equals(...dictionaries: object[]): boolean export function equalsDeep(...dictionaries: object[]): boolean export function every( dictionary: T, predicate: (value: T[K], key: K, dictionary: Readonly) => unknown ): boolean export function filter( dictionary: T, predicate: (value: T[K], key: K, dictionary: Readonly) => unknown ): Partial export function flatten( dictionary: T, depth?: number ): Record export function flip( dictionary: T ): Record export function freeze(dictionary: T): Readonly export function freezeDeep(dictionary: T): ReadonlyDeep export function fromArrays( keys: K[], values: V[] ): ObjectFromKeyValueArrays export function fromEntries( entries: T ): FromEntries export function has(dictionary: T, key: unknown): boolean export function includes( dictionary: T, value: unknown ): boolean export function keys(dictionary: T): K[] export function map< T extends object, MV, MK extends ObjectKey, K extends keyof T >( dictionary: T, mapper: ( value: T[K], key: K, dictionary: Readonly ) => LuaTuple<[newValue: MV, newKey: MK]> | undefined ): { [key in MK]: MV } export function map( dictionary: T, mapper: (value: T[K], key: K, dictionary: Readonly) => MV | undefined ): { [key in K]: MV } export function merge( ...dictionaries: T ): ExcludeNone> export function mergeDeep( ...dictionaries: T ): ExcludeNone> export function removeKey( dictionary: T, key: K ): Omit export function removeKeys( dictionary: T, ...keys: K[] ): Omit export function removeValue( dictionary: T, value: V ): ExcludeMembers export function removeValues( dictionary: T, ...values: V ): ExcludeMembers export function set( dictionary: T, key: K, value: V ): T & { [key in K]: V } export function set( dictionary: T, key: K, value: V ): T & { [key in K]: V } export function some( dictionary: T, predicate: (value: T[K], key: K, dictionary: Readonly) => unknown ): boolean export function update< T extends object, K extends ObjectKey, X = TryIndex, Y = undefined >( dictionary: T, key: K, updater?: (value: TryIndex, key: K) => X, callback?: (key: K) => Y ): (TryIndex extends undefined ? { [key in keyof T]: key extends K ? X : T[key] } : { [key in keyof T]: key extends K ? Y : T[key] }) & { [key in K]: X } export function values(dictionary: T): T[keyof T][] export function withKeys( dictionary: T, ...keys: K[] ): Pick // Aliases export { merge as join, mergeDeep as joinDeep } } export = SiftDictionary