import { Compactable2 } from './Compactable.js'; import { Either } from './Either.js'; import { Eq } from './Eq.js'; import { Filterable2 } from './Filterable.js'; import { FilterableWithIndex2C } from './FilterableWithIndex.js'; import { Foldable, Foldable1, Foldable2, Foldable2C, Foldable3 } from './Foldable.js'; import { FoldableWithIndex2C } from './FoldableWithIndex.js'; import { Functor2 } from './Functor.js'; import { FunctorWithIndex2C } from './FunctorWithIndex.js'; import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from './HKT.js'; import { Magma } from './Magma.js'; import { Monoid } from './Monoid.js'; import * as O from './Option.js'; import { Ord } from './Ord.js'; import { Predicate } from './Predicate.js'; import { Refinement } from './Refinement.js'; import { Semigroup } from './Semigroup.js'; import { Separated } from './Separated.js'; import { Show } from './Show.js'; import { Traversable2C } from './Traversable.js'; import { TraversableWithIndex2C } from './TraversableWithIndex.js'; import { Unfoldable, Unfoldable1 } from './Unfoldable.js'; import { Witherable2C } from './Witherable.js'; type Option = O.Option; /** * @category conversions * @since 2.5.0 */ export declare const fromMap: (m: Map) => ReadonlyMap; /** * @category conversions * @since 2.5.0 */ export declare function toMap(m: ReadonlyMap): Map; /** * @category instances * @since 2.5.0 */ export declare function getShow(SK: Show, SA: Show): Show>; /** * Calculate the number of key/value pairs in a map * * @since 2.5.0 */ export declare const size: (m: ReadonlyMap) => number; /** * Test whether or not a map is empty * * @since 2.5.0 */ export declare const isEmpty: (m: ReadonlyMap) => boolean; /** * Test whether or not a key exists in a map * * @since 2.5.0 */ export declare function member(E: Eq): { (k: K): (m: ReadonlyMap) => boolean; (k: K, m: ReadonlyMap): boolean; }; /** * Test whether or not a value is a member of a map * * @since 2.5.0 */ export declare function elem(E: Eq): { (a: A): (m: ReadonlyMap) => boolean; (a: A, m: ReadonlyMap): boolean; }; /** * Get a sorted `ReadonlyArray` of the keys contained in a `ReadonlyMap`. * * @since 2.5.0 */ export declare const keys: (O: Ord) => (m: ReadonlyMap) => ReadonlyArray; /** * Get a sorted `ReadonlyArray` of the values contained in a `ReadonlyMap`. * * @since 2.5.0 */ export declare const values: (O: Ord) => (m: ReadonlyMap) => ReadonlyArray; /** * @since 2.5.0 */ export declare function collect(O: Ord): (f: (k: K, a: A) => B) => (m: ReadonlyMap) => ReadonlyArray; /** * Get a sorted `ReadonlyArray` of the key/value pairs contained in a `ReadonlyMap`. * * @category conversions * @since 2.5.0 */ export declare const toReadonlyArray: (O: Ord) => ((m: ReadonlyMap) => ReadonlyArray); /** * Unfolds a map into a list of key/value pairs * * @category conversions * @since 2.5.0 */ export declare function toUnfoldable(ord: Ord, U: Unfoldable1): (d: ReadonlyMap) => Kind; export declare function toUnfoldable(ord: Ord, U: Unfoldable): (d: ReadonlyMap) => HKT; /** * Insert or replace a key/value pair in a `ReadonlyMap`. * * @since 2.10.0 */ export declare const upsertAt: (E: Eq) => ((k: K, a: A) => (m: ReadonlyMap) => ReadonlyMap); /** * Delete a key and value from a map * * @since 2.5.0 */ export declare const deleteAt: (E: Eq) => ((k: K) => (m: ReadonlyMap) => ReadonlyMap); /** * @since 2.5.0 */ export declare const updateAt: (E: Eq) => ((k: K, a: A) => (m: ReadonlyMap) => Option>); /** * @since 2.5.0 */ export declare const modifyAt: (E: Eq) => ((k: K, f: (a: A) => A) => (m: ReadonlyMap) => Option>); /** * Delete a key and value from a map, returning the value as well as the subsequent map * * @since 2.5.0 */ export declare function pop(E: Eq): (k: K) => (m: ReadonlyMap) => Option]>; /** * Lookup the value for a key in a `Map`. * If the result is a `Some`, the existing key is also returned. * * @since 2.5.0 */ export declare function lookupWithKey(E: Eq): { (k: K): (m: ReadonlyMap) => Option; (k: K, m: ReadonlyMap): Option; }; /** * Lookup the value for a key in a `Map`. * * @since 2.5.0 */ export declare function lookup(E: Eq): { (k: K): (m: ReadonlyMap) => Option; (k: K, m: ReadonlyMap): Option; }; /** * Test whether or not one `Map` contains all of the keys and values contained in another `Map` * * @since 2.5.0 */ export declare function isSubmap(SK: Eq, SA: Eq): { (that: ReadonlyMap): (me: ReadonlyMap) => boolean; (me: ReadonlyMap, that: ReadonlyMap): boolean; }; /** * @since 2.5.0 */ export declare const empty: ReadonlyMap; /** * @category instances * @since 2.5.0 */ export declare function getEq(SK: Eq, SA: Eq): Eq>; /** * Gets `Monoid` instance for Maps given `Semigroup` instance for their values * * @category instances * @since 2.5.0 */ export declare function getMonoid(SK: Eq, SA: Semigroup): Monoid>; /** * Create a map with one key/value pair * * @category constructors * @since 2.5.0 */ export declare const singleton: (k: K, a: A) => ReadonlyMap; /** * Create a map from a foldable collection of key/value pairs, using the * specified `Magma` to combine values for duplicate keys. * * @category constructors * @since 2.5.0 */ export declare function fromFoldable(E: Eq, M: Magma, F: Foldable3): (fka: Kind3) => ReadonlyMap; export declare function fromFoldable(E: Eq, M: Magma, F: Foldable2): (fka: Kind2) => ReadonlyMap; export declare function fromFoldable(E: Eq, M: Magma, F: Foldable1): (fka: Kind) => ReadonlyMap; export declare function fromFoldable(E: Eq, M: Magma, F: Foldable): (fka: HKT) => ReadonlyMap; /** * @since 2.10.0 */ export declare const partitionMapWithIndex: (f: (k: K, a: A) => Either) => (fa: ReadonlyMap) => Separated, ReadonlyMap>; /** * @since 2.10.0 */ export declare function partitionWithIndex(predicateWithIndex: (k: K, a: A) => a is B): (m: ReadonlyMap) => Separated, ReadonlyMap>; export declare function partitionWithIndex(predicateWithIndex: (k: K, a: A) => boolean): (m: ReadonlyMap) => Separated, ReadonlyMap>; export declare function partitionWithIndex(predicateWithIndex: (k: K, a: A) => boolean): (m: ReadonlyMap) => Separated, ReadonlyMap>; /** * @since 2.10.0 */ export declare const filterMapWithIndex: (f: (k: K, a: A) => Option) => (fa: ReadonlyMap) => ReadonlyMap; /** * @since 2.10.0 */ export declare function filterWithIndex(predicateWithIndex: (k: K, a: A) => a is B): (m: ReadonlyMap) => ReadonlyMap; export declare function filterWithIndex(predicateWithIndex: (k: K, a: A) => boolean): (m: ReadonlyMap) => ReadonlyMap; export declare function filterWithIndex(predicateWithIndex: (k: K, a: A) => boolean): (m: ReadonlyMap) => ReadonlyMap; /** * @category filtering * @since 2.5.0 */ export declare const compact: (fa: ReadonlyMap>) => ReadonlyMap; /** * @category filtering * @since 2.5.0 */ export declare const filter: { (refinement: Refinement): (fa: ReadonlyMap) => ReadonlyMap; (predicate: Predicate): (fb: ReadonlyMap) => ReadonlyMap; (predicate: Predicate): (fa: ReadonlyMap) => ReadonlyMap; }; /** * @category filtering * @since 2.5.0 */ export declare const filterMap: (f: (a: A) => Option) => (fa: ReadonlyMap) => ReadonlyMap; /** * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types * use the type constructor `F` to represent some computational context. * * @category mapping * @since 2.5.0 */ export declare const map: (f: (a: A) => B) => (fa: ReadonlyMap) => ReadonlyMap; /** * @category mapping * @since 2.7.1 */ export declare const mapWithIndex: (f: (k: K, a: A) => B) => (fa: ReadonlyMap) => ReadonlyMap; /** * @category filtering * @since 2.5.0 */ export declare const partition: { (refinement: Refinement): (fa: ReadonlyMap) => Separated, ReadonlyMap>; (predicate: Predicate): (fb: ReadonlyMap) => Separated, ReadonlyMap>; (predicate: Predicate): (fa: ReadonlyMap) => Separated, ReadonlyMap>; }; /** * @category filtering * @since 2.5.0 */ export declare const partitionMap: (f: (a: A) => Either) => (fa: ReadonlyMap) => Separated, ReadonlyMap>; /** * @category filtering * @since 2.5.0 */ export declare const separate: (fa: ReadonlyMap>) => Separated, ReadonlyMap>; /** * @category type lambdas * @since 2.5.0 */ export declare const URI = "ReadonlyMap"; /** * @category type lambdas * @since 2.5.0 */ export type URI = typeof URI; declare module './HKT.js' { interface URItoKind2 { readonly [URI]: ReadonlyMap; } } /** * @category instances * @since 2.11.0 */ export declare const getUnionSemigroup: (E: Eq, S: Semigroup) => Semigroup>; /** * @category instances * @since 2.11.0 */ export declare const getUnionMonoid: (E: Eq, S: Semigroup) => Monoid>; /** * @category instances * @since 2.11.0 */ export declare const getIntersectionSemigroup: (E: Eq, S: Semigroup) => Semigroup>; /** * @category instances * @since 2.11.0 */ export declare const getDifferenceMagma: (E: Eq) => () => Magma>; /** * @category filtering * @since 2.5.0 */ export declare function getFilterableWithIndex(): FilterableWithIndex2C; /** * @category instances * @since 2.7.0 */ export declare const Functor: Functor2; /** * @category mapping * @since 2.10.0 */ export declare const flap: (a: A) => (fab: Kind2<"ReadonlyMap", E, (a: A) => B>) => Kind2<"ReadonlyMap", E, B>; /** * @category instances * @since 2.10.0 */ export declare const getFunctorWithIndex: () => FunctorWithIndex2C; /** * @category instances * @since 2.7.0 */ export declare const Compactable: Compactable2; /** * @category instances * @since 2.7.0 */ export declare const Filterable: Filterable2; /** * @category folding * @since 2.11.0 */ export declare const reduce: (O: Ord) => ((b: B, f: (b: B, a: A) => B) => (m: ReadonlyMap) => B); /** * @category folding * @since 2.11.0 */ export declare const foldMap: (O: Ord) => ((M: Monoid) => (f: (a: A) => M) => (m: ReadonlyMap) => M); /** * @category folding * @since 2.11.0 */ export declare const reduceRight: (O: Ord) => ((b: B, f: (a: A, b: B) => B) => (m: ReadonlyMap) => B); /** * @category folding * @since 2.10.0 */ export declare const getFoldable: (O: Ord) => Foldable2C; /** * @category folding * @since 2.11.0 */ export declare const reduceWithIndex: (O: Ord) => ((b: B, f: (k: K, b: B, a: A) => B) => (m: ReadonlyMap) => B); /** * @category folding * @since 2.11.0 */ export declare const foldMapWithIndex: (O: Ord) => ((M: Monoid) => (f: (k: K, a: A) => M) => (m: ReadonlyMap) => M); /** * @category folding * @since 2.11.0 */ export declare const reduceRightWithIndex: (O: Ord) => ((b: B, f: (k: K, a: A, b: B) => B) => (m: ReadonlyMap) => B); /** * @category folding * @since 2.10.0 */ export declare const getFoldableWithIndex: (O: Ord) => FoldableWithIndex2C; /** * @category traversing * @since 2.10.0 */ export declare const getTraversable: (O: Ord) => Traversable2C; /** * @category traversing * @since 2.10.0 */ export declare const getTraversableWithIndex: (O: Ord) => TraversableWithIndex2C; /** * @category filtering * @since 2.5.0 */ export declare function getWitherable(O: Ord): Witherable2C & TraversableWithIndex2C; /** * @since 2.11.0 */ export declare const union: (E: Eq, M: Magma) => ((second: ReadonlyMap) => (first: ReadonlyMap) => ReadonlyMap); /** * @since 2.11.0 */ export declare const intersection: (E: Eq, M: Magma) => ((second: ReadonlyMap) => (first: ReadonlyMap) => ReadonlyMap); /** * @since 2.11.0 */ export declare const difference: (E: Eq) => ((_second: ReadonlyMap) => (first: ReadonlyMap) => ReadonlyMap); /** * Use [`upsertAt`](#upsertat) instead. * @category zone of death * @since 2.5.0 * @deprecated */ export declare const insertAt: (E: Eq) => (k: K, a: A) => (m: ReadonlyMap) => ReadonlyMap; /** * This instance is deprecated, use small, specific instances instead. * For example if a function needs a `Functor` instance, pass `RM.Functor` instead of `RM.readonlyMap` * (where `RM` is from `import RM from 'fp-ts/ReadonlyMap'`) * * @category zone of death * @since 2.5.0 * @deprecated */ export declare const readonlyMap: Filterable2; export {};