import { Compactable2 } from './Compactable' import { Either } from './Either' import { Eq } from './Eq' import { Filterable2 } from './Filterable' import { FilterableWithIndex2C } from './FilterableWithIndex' import { Foldable, Foldable1, Foldable2, Foldable2C, Foldable3 } from './Foldable' import { FoldableWithIndex2C } from './FoldableWithIndex' import { Functor2 } from './Functor' import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from './HKT' import { Magma } from './Magma' import { Monoid } from './Monoid' import * as O from './Option' import { Ord } from './Ord' import { Predicate } from './Predicate' import { Refinement } from './Refinement' import { Semigroup } from './Semigroup' import { Separated } from './Separated' import { Show } from './Show' import { TraversableWithIndex2C } from './TraversableWithIndex' import { Unfoldable, Unfoldable1 } from './Unfoldable' import { Witherable2C } from './Witherable' import Option = O.Option /** * @category instances * @since 2.0.0 */ export declare const getShow: (SK: Show, SA: Show) => Show> /** * Calculate the number of key/value pairs in a map * * @since 2.0.0 */ export declare const size: (m: Map) => number /** * Test whether or not a map is empty * * @since 2.0.0 */ export declare const isEmpty: (m: Map) => boolean /** * Test whether or not a key exists in a map * * @since 2.0.0 */ export declare const member: (E: Eq) => { (k: K): (m: Map) => boolean (k: K, m: Map): boolean } /** * Test whether or not a value is a member of a map * * @since 2.0.0 */ export declare const elem: (E: Eq) => { (a: A): (m: Map) => boolean (a: A, m: Map): boolean } /** * Get a sorted `Array` of the keys contained in a `Map`. * * @since 2.0.0 */ export declare const keys: (O: Ord) => (m: Map) => K[] /** * Get a sorted `Array` of the values contained in a `Map`. * * @since 2.0.0 */ export declare const values: (O: Ord) => (m: Map) => A[] /** * @since 2.0.0 */ export declare function collect(O: Ord): (f: (k: K, a: A) => B) => (m: Map) => Array /** * Get a sorted `Array` of the key/value pairs contained in a `Map`. * * @since 2.0.0 */ export declare function toArray(O: Ord): (m: Map) => Array<[K, A]> /** * Unfolds a map into a list of key/value pairs * * @since 2.0.0 */ export declare function toUnfoldable( ord: Ord, U: Unfoldable1 ): (d: Map) => Kind export declare function toUnfoldable(ord: Ord, U: Unfoldable): (d: Map) => HKT /** * Insert or replace a key/value pair in a `Map`. * * @since 2.0.0 */ export declare const upsertAt: (E: Eq) => (k: K, a: A) => (m: Map) => Map /** * Delete a key and value from a map * * @since 2.0.0 */ export declare const deleteAt: (E: Eq) => (k: K) => (m: Map) => Map /** * @since 2.0.0 */ export declare const updateAt: (E: Eq) => (k: K, a: A) => (m: Map) => O.Option> /** * @since 2.0.0 */ export declare const modifyAt: (E: Eq) => (k: K, f: (a: A) => A) => (m: Map) => O.Option> /** * Delete a key and value from a map, returning the value as well as the subsequent map * * @since 2.0.0 */ export declare function pop(E: Eq): (k: K) => (m: Map) => Option<[A, Map]> /** * Lookup the value for a key in a `Map`. * If the result is a `Some`, the existing key is also returned. * * @since 2.0.0 */ export declare function lookupWithKey(E: Eq): { (k: K): (m: Map) => Option<[K, A]> (k: K, m: Map): Option<[K, A]> } /** * Lookup the value for a key in a `Map`. * * @since 2.0.0 */ export declare const lookup: (E: Eq) => { (k: K): (m: Map) => Option (k: K, m: Map): Option } /** * Test whether or not one `Map` contains all of the keys and values contained in another `Map` * * @since 2.0.0 */ export declare const isSubmap: ( SK: Eq, SA: Eq ) => { (that: Map): (me: Map) => boolean (me: Map, that: Map): boolean } /** * @category instances * @since 2.0.0 */ export declare const getEq: (SK: Eq, SA: Eq) => Eq> /** * Gets `Monoid` instance for Maps given `Semigroup` instance for their values * * @category instances * @since 2.0.0 */ export declare function getMonoid(SK: Eq, SA: Semigroup): Monoid> /** * Create a map with one key/value pair * * @since 2.0.0 */ export declare const singleton: (k: K, a: A) => Map /** * 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.0.0 */ export declare function fromFoldable( E: Eq, M: Magma, F: Foldable3 ): (fka: Kind3) => Map export declare function fromFoldable( E: Eq, M: Magma, F: Foldable2 ): (fka: Kind2) => Map export declare function fromFoldable( E: Eq, M: Magma, F: Foldable1 ): (fka: Kind) => Map export declare function fromFoldable(E: Eq, M: Magma, F: Foldable): (fka: HKT) => Map /** * @since 2.10.0 */ export declare const partitionMapWithIndex: ( f: (k: K, a: A) => Either ) => (fa: Map) => Separated, Map> /** * @since 2.10.0 */ export declare function partitionWithIndex( predicateWithIndex: (k: K, a: A) => a is B ): (fa: Map) => Separated, Map> export declare function partitionWithIndex( predicateWithIndex: (k: K, a: A) => boolean ): (fb: Map) => Separated, Map> export declare function partitionWithIndex( predicateWithIndex: (k: K, a: A) => boolean ): (fa: Map) => Separated, Map> /** * @since 2.10.0 */ export declare const filterMapWithIndex: (f: (k: K, a: A) => O.Option) => (fa: Map) => Map /** * @since 2.10.0 */ export declare function filterWithIndex(p: (k: K, a: A) => a is B): (m: Map) => Map export declare function filterWithIndex(p: (k: K, a: A) => boolean): (m: Map) => Map export declare function filterWithIndex(p: (k: K, a: A) => boolean): (m: Map) => Map /** * @category filtering * @since 2.0.0 */ export declare const compact: (fa: Map>) => Map /** * @category filtering * @since 2.0.0 */ export declare const filter: { (refinement: Refinement): (fa: Map) => Map (predicate: Predicate): (fb: Map) => Map (predicate: Predicate): (fa: Map) => Map } /** * @category filtering * @since 2.0.0 */ export declare const filterMap: (f: (a: A) => Option) => (fa: Map) => Map /** * `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.0.0 */ export declare const map: (f: (a: A) => B) => (fa: Map) => Map /** * @category mapping * @since 2.7.1 */ export declare const mapWithIndex: (f: (k: K, a: A) => B) => (fa: Map) => Map /** * @category filtering * @since 2.0.0 */ export declare const partition: { (refinement: Refinement): (fa: Map) => Separated, Map> (predicate: Predicate): (fb: Map) => Separated, Map> (predicate: Predicate): (fa: Map) => Separated, Map> } /** * @category filtering * @since 2.0.0 */ export declare const partitionMap: ( f: (a: A) => Either ) => (fa: Map) => Separated, Map> /** * @category filtering * @since 2.0.0 */ export declare const separate: (fa: Map>) => Separated, Map> /** * @category type lambdas * @since 2.0.0 */ export declare const URI = 'Map' /** * @category type lambdas * @since 2.0.0 */ export declare type URI = typeof URI declare module './HKT' { interface URItoKind2 { readonly [URI]: Map } } /** * @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.0.0 */ export declare function getFilterableWithIndex(): FilterableWithIndex2C /** * @category filtering * @since 2.0.0 */ export declare function getWitherable(O: Ord): Witherable2C & TraversableWithIndex2C /** * @category folding * @since 2.11.0 */ export declare const reduce: (O: Ord) => (b: B, f: (b: B, a: A) => B) => (m: Map) => B /** * @category folding * @since 2.11.0 */ export declare const foldMap: (O: Ord) => (M: Monoid) => (f: (a: A) => M) => (m: Map) => M /** * @category folding * @since 2.11.0 */ export declare const reduceRight: (O: Ord) => (b: B, f: (a: A, b: B) => B) => (m: Map) => B /** * @category folding * @since 2.11.0 */ export declare const getFoldable: (O: Ord) => Foldable2C<'Map', K> /** * @category folding * @since 2.11.0 */ export declare const reduceWithIndex: (O: Ord) => (b: B, f: (k: K, b: B, a: A) => B) => (m: Map) => B /** * @category folding * @since 2.11.0 */ export declare const foldMapWithIndex: ( O: Ord ) => (M: Monoid) => (f: (k: K, a: A) => M) => (m: Map) => M /** * @category folding * @since 2.11.0 */ export declare const reduceRightWithIndex: ( O: Ord ) => (b: B, f: (k: K, a: A, b: B) => B) => (m: Map) => B /** * @category folding * @since 2.10.0 */ export declare const getFoldableWithIndex: (O: Ord) => FoldableWithIndex2C<'Map', K, K> /** * @category traversing * @since 2.10.0 */ export declare const getTraversableWithIndex: (O: Ord) => TraversableWithIndex2C<'Map', K, K> /** * @category instances * @since 2.7.0 */ export declare const Functor: Functor2 /** * @category mapping * @since 2.10.0 */ export declare const flap: (a: A) => (fab: Map B>) => Map /** * @category instances * @since 2.7.0 */ export declare const Compactable: Compactable2 /** * @category instances * @since 2.7.0 */ export declare const Filterable: Filterable2 /** * @since 2.11.0 */ export declare const union: (E: Eq, M: Magma) => (second: Map) => (first: Map) => Map /** * @since 2.11.0 */ export declare const intersection: ( E: Eq, M: Magma ) => (second: Map) => (first: Map) => Map /** * @since 2.11.0 */ export declare const difference: (E: Eq) => (_second: Map) => (first: Map) => Map /** * Use a `new Map()` instead. * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const empty: Map /** * Use [`upsertAt`](#upsertat) instead. * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const insertAt: (E: Eq) => (k: K, a: A) => (m: Map) => Map /** * Use [`Filterable`](#filterable) instead. * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const map_: Filterable2