/**
 * The `ReadonlyRecord.ts` module enables dealing in a functional way with Typescript's `Readonly<Record<K, T>>` type.
 * That is similar to the `Record.ts` module, but for a record with all properties declared as `readonly`.
 *
 * @remarks
 * Added in 1.0.0
 * @packageDocumentation
 */
import { type Applicative, type Applicative1, type Applicative2, type Applicative2C, type Applicative3, type Applicative3C, type Applicative4 } from "./Applicative.js";
import { type Compactable1 } from "./Compactable.js";
import { type Either } from "./Either.js";
import { type Eq } from "./Eq.js";
import { type Filterable1 } from "./Filterable.js";
import { type FilterableWithIndex1, type PredicateWithIndex, type RefinementWithIndex } from "./FilterableWithIndex.js";
import { type Foldable as FoldableHKT, type Foldable1, type Foldable2, type Foldable3 } from "./Foldable.js";
import { type FoldableWithIndex1 } from "./FoldableWithIndex.js";
import { type Functor1 } from "./Functor.js";
import { type FunctorWithIndex1 } from "./FunctorWithIndex.js";
import { type HKT, type Kind, type Kind2, type Kind3, type Kind4, type URIS, type URIS2, type URIS3, type URIS4 } from "./HKT.js";
import { type Magma } from "./Magma.js";
import { type Monoid } from "./Monoid.js";
import { type Option } from "./Option.js";
import { type Ord } from "./Ord.js";
import { type Predicate } from "./Predicate.js";
import { type Refinement } from "./Refinement.js";
import { type Semigroup } from "./Semigroup.js";
import { type Separated } from "./Separated.js";
import { type Show } from "./Show.js";
import { type Traversable1 } from "./Traversable.js";
import { type TraversableWithIndex1 } from "./TraversableWithIndex.js";
import { type Unfoldable, type Unfoldable1 } from "./Unfoldable.js";
import { type PipeableWilt1, type PipeableWither1, type Witherable1 } from "./Witherable.js";
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Model
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export type ReadonlyRecord<K extends string, T> = Readonly<Record<K, T>>;
/**
 * Builds a `ReadonlyRecord` by copying a `Record`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Conversions
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { ReadonlyRecord, fromRecord } from '@fp-tx/core/ReadonlyRecord'
 *
 * const x: Record<string, number> = { a: 1, b: 2 }
 * const y: ReadonlyRecord<string, number> = fromRecord(x)
 * assert.deepStrictEqual(x, y)
 * // `y.a = 5` gives compiler error
 * ```
 *
 * @public
 */
export declare const fromRecord: <K extends string, A>(r: Record<K, A>) => Readonly<Record<K, A>>;
/**
 * Builds a mutable `Record` from a `ReadonlyRecord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Conversions
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { ReadonlyRecord, toRecord } from '@fp-tx/core/ReadonlyRecord'
 *
 * const x: ReadonlyRecord<string, number> = { a: 1, b: 2 }
 * const y: Record<string, number> = toRecord(x)
 * assert.deepStrictEqual(x, y)
 * y.a = 5 // it's ok, y is mutable
 * ```
 *
 * @public
 */
export declare const toRecord: <K extends string, A>(r: Readonly<Record<K, A>>) => Record<K, A>;
/**
 * Calculate the number of key/value pairs in a `ReadonlyRecord`,
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { size } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(size({ a: true, b: 2, c: 'three' }), 3)
 * ```
 *
 * @public
 */
export declare const size: <A>(r: Readonly<Record<string, A>>) => number;
/**
 * Test whether a `ReadonlyRecord` is empty.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { isEmpty } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(isEmpty({}), true)
 * assert.deepStrictEqual(isEmpty({ a: 3 }), false)
 * ```
 *
 * @public
 */
export declare const isEmpty: <A>(r: Readonly<Record<string, A>>) => boolean;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const keys: <K extends string>(r: ReadonlyRecord<K, unknown>) => ReadonlyArray<K>;
/**
 * Map a `ReadonlyRecord` into an `ReadonlyArray`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { collect } from '@fp-tx/core/ReadonlyRecord'
 * import { Ord } from '@fp-tx/core/string'
 *
 * const f = <A>(k: string, a: A) => `${k.toUpperCase()}-${a}`
 * const x = { c: 3, a: 'foo', b: false }
 * assert.deepStrictEqual(collect(Ord)(f)(x), ['A-foo', 'B-false', 'C-3'])
 * ```
 *
 * @public
 */
export declare function collect(O: Ord<string>): <K extends string, A, B>(f: (k: K, a: A) => B) => (r: ReadonlyRecord<K, A>) => ReadonlyArray<B>;
/**
 * Use the overload constrained by `Ord` instead.
 *
 * @deprecated Use the overload constrained by `Ord` instead.
 */
export declare function collect<K extends string, A, B>(f: (k: K, a: A) => B): (r: ReadonlyRecord<K, A>) => ReadonlyArray<B>;
/**
 * Get a sorted `ReadonlyArray` of the key/value pairs contained in a `ReadonlyRecord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Conversions
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { toReadonlyArray } from '@fp-tx/core/ReadonlyRecord'
 *
 * const x = { c: 3, a: 'foo', b: false }
 * assert.deepStrictEqual(toReadonlyArray(x), [
 *   ['a', 'foo'],
 *   ['b', false],
 *   ['c', 3],
 * ])
 * ```
 *
 * @public
 */
export declare const toReadonlyArray: <K extends string, A>(r: ReadonlyRecord<K, A>) => ReadonlyArray<readonly [K, A]>;
/**
 * Unfolds a `ReadonlyRecord` into a list of key/value pairs.
 *
 * Given an `Unfoldable` class type `U` such as `array` or `readonlyArray`, it uses the `unfold` function to create an
 * instance of `U`, providing an iterating function that iterates over each key/value pair in the record sorted
 * alphabetically by key.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Conversions
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { array, readonlyArray } from 'fp-ts'
 * import { toUnfoldable } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(toUnfoldable(array)({ b: 2, a: 1 }), [
 *   ['a', 1],
 *   ['b', 2],
 * ])
 * assert.deepStrictEqual(toUnfoldable(readonlyArray)({ b: 2, a: 1 }), [
 *   ['a', 1],
 *   ['b', 2],
 * ])
 * ```
 *
 * @public
 */
export declare function toUnfoldable<F extends URIS>(U: Unfoldable1<F>): <K extends string, A>(r: ReadonlyRecord<K, A>) => Kind<F, readonly [K, A]>;
export declare function toUnfoldable<F>(U: Unfoldable<F>): <K extends string, A>(r: ReadonlyRecord<K, A>) => HKT<F, readonly [K, A]>;
/**
 * Insert or replace a key/value pair in a `ReadonlyRecord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { upsertAt } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(upsertAt('a', 5)({ a: 1, b: 2 }), { a: 5, b: 2 })
 * assert.deepStrictEqual(upsertAt('c', 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 })
 * ```
 *
 * @public
 */
export declare const upsertAt: <A>(k: string, a: A) => (r: Readonly<Record<string, A>>) => Readonly<Record<string, A>>;
/**
 * Test whether or not a key exists in a `ReadonlyRecord`.
 *
 * Note. This function is not pipeable because is a `Refinement`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { has } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(has('a', { a: 1, b: 2 }), true)
 * assert.deepStrictEqual(has('c', { a: 1, b: 2 }), false)
 * ```
 *
 * @public
 */
export declare const has: <K extends string>(k: string, r: Readonly<Record<K, unknown>>) => k is K;
/**
 * Delete a key and value from a `ReadonlyRecord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { deleteAt } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(deleteAt('a')({ a: 1, b: 2 }), { b: 2 })
 * assert.deepStrictEqual(deleteAt('c')({ a: 1, b: 2 }), { a: 1, b: 2 })
 * ```
 *
 * @public
 */
export declare function deleteAt<K extends string>(k: K): <KS extends string, A>(r: ReadonlyRecord<KS, A>) => ReadonlyRecord<string extends K ? string : Exclude<KS, K>, A>;
/**
 * Replace a key/value pair in a `ReadonlyRecord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * otherwise it returns `None`
 *
 * ```
 *
 * @public
 */
export declare const updateAt: <A>(k: string, a: A) => <K extends string>(r: Readonly<Record<K, A>>) => Option<Readonly<Record<K, A>>>;
/**
 * Applies a mapping function to one specific key/value pair in a `ReadonlyRecord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * otherwise it returns `None`
 *
 * ```
 *
 * @public
 */
export declare const modifyAt: <A>(k: string, f: (a: A) => A) => <K extends string>(r: Readonly<Record<K, A>>) => Option<Readonly<Record<K, A>>>;
/**
 * Delete a key and value from a `ReadonlyRecord`, returning the value as well as the subsequent `ReadonlyRecord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * otherwise it returns `None`
 *
 * ```
 *
 * @public
 */
export declare function pop<K extends string>(k: K): <KS extends string, A>(r: ReadonlyRecord<KS, A>) => Option<readonly [A, ReadonlyRecord<string extends K ? string : Exclude<KS, K>, A>]>;
/**
 * Test whether one `ReadonlyRecord` contains all of the keys and values contained in another `ReadonlyRecord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { isSubrecord } from '@fp-tx/core/ReadonlyRecord'
 * import { string } from 'fp-ts'
 *
 * assert.deepStrictEqual(
 *   isSubrecord(string.Eq)({ a: 'foo', b: 'bar', c: 'baz' })({ a: 'foo', b: 'bar', c: 'baz' }),
 *   true,
 * )
 * assert.deepStrictEqual(isSubrecord(string.Eq)({ a: 'foo', b: 'bar', c: 'baz' })({ a: 'foo', c: 'baz' }), true)
 * assert.deepStrictEqual(
 *   isSubrecord(string.Eq)({ a: 'foo', b: 'bar', c: 'baz' })({ a: 'foo', b: 'not-bar', c: 'baz' }),
 *   false,
 * )
 * assert.deepStrictEqual(isSubrecord(string.Eq)({ a: 'foo', b: 'bar' })({ a: 'foo', b: 'bar', c: 'baz' }), false)
 * ```
 *
 * @public
 */
export declare function isSubrecord<A>(E: Eq<A>): {
    (that: ReadonlyRecord<string, A>): (me: ReadonlyRecord<string, A>) => boolean;
    (me: ReadonlyRecord<string, A>, that: ReadonlyRecord<string, A>): boolean;
};
/**
 * Lookup the value for a key in a `ReadonlyRecord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * @public
 */
export declare function lookup(k: string): <A>(r: ReadonlyRecord<string, A>) => Option<A>;
export declare function lookup<A>(k: string, r: ReadonlyRecord<string, A>): Option<A>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const empty: ReadonlyRecord<string, never>;
/**
 * Map a `ReadonlyRecord` passing the keys to the iterating function.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { mapWithIndex } from '@fp-tx/core/ReadonlyRecord'
 *
 * const f = (k: string, n: number) => `${k.toUpperCase()}-${n}`
 * assert.deepStrictEqual(mapWithIndex(f)({ a: 3, b: 5 }), { a: 'A-3', b: 'B-5' })
 * ```
 *
 * @public
 */
export declare function mapWithIndex<K extends string, A, B>(f: (k: K, a: A) => B): (fa: ReadonlyRecord<K, A>) => ReadonlyRecord<K, B>;
/**
 * Map a `ReadonlyRecord` passing the values to the iterating function.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { map } from '@fp-tx/core/ReadonlyRecord'
 *
 * const f = (n: number) => `-${n}-`
 * assert.deepStrictEqual(map(f)({ a: 3, b: 5 }), { a: '-3-', b: '-5-' })
 * ```
 *
 * @public
 */
export declare function map<A, B>(f: (a: A) => B): <K extends string>(fa: ReadonlyRecord<K, A>) => ReadonlyRecord<K, B>;
/**
 * Reduces a `ReadonlyRecord` passing each key/value pair to the iterating function. Entries are processed in the order,
 * sorted by key according to the given `Ord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { reduceWithIndex } from '@fp-tx/core/ReadonlyRecord'
 * import { Ord } from '@fp-tx/core/string'
 *
 * const x = { c: 3, a: 'foo', b: false }
 * assert.deepStrictEqual(reduceWithIndex(Ord)([] as string[], (k, b, a) => [...b, `${k}-${a}`])(x), [
 *   'a-foo',
 *   'b-false',
 *   'c-3',
 * ])
 * ```
 *
 * @public
 */
export declare function reduceWithIndex(O: Ord<string>): <K extends string, A, B>(b: B, f: (k: K, b: B, a: A) => B) => (fa: ReadonlyRecord<K, A>) => B;
/**
 * Use the overload constrained by `Ord` instead.
 *
 * @deprecated Use the overload constrained by `Ord` instead.
 */
export declare function reduceWithIndex<K extends string, A, B>(b: B, f: (k: K, b: B, a: A) => B): (fa: ReadonlyRecord<K, A>) => B;
/**
 * Map and fold a `ReadonlyRecord`. Map the `ReadonlyRecord` passing each key/value pair to the iterating function. Then
 * fold the results using the provided `Monoid`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { foldMapWithIndex } from '@fp-tx/core/ReadonlyRecord'
 * import { Ord } from '@fp-tx/core/string'
 * import { Monoid } from '@fp-tx/core/Monoid'
 *
 * const m: Monoid<string> = { empty: '', concat: (x: string, y: string) => (x ? `${x} -> ${y}` : `${y}`) }
 * const f = (k: string, a: number) => `${k}-${a}`
 * const x = { c: 3, a: 1, b: 2 }
 * assert.deepStrictEqual(foldMapWithIndex(Ord)(m)(f)(x), 'a-1 -> b-2 -> c-3')
 * ```
 *
 * @public
 */
export declare function foldMapWithIndex(O: Ord<string>): <M>(M: Monoid<M>) => <K extends string, A>(f: (k: K, a: A) => M) => (fa: ReadonlyRecord<K, A>) => M;
/**
 * Use the overload constrained by `Ord` instead.
 *
 * @deprecated Use the overload constrained by `Ord` instead.
 */
export declare function foldMapWithIndex<M>(M: Monoid<M>): <K extends string, A>(f: (k: K, a: A) => M) => (fa: ReadonlyRecord<K, A>) => M;
/**
 * Same as `reduceWithIndex`, but reduce starting from the right (i.e. in reverse order, from the last to the first
 * entry according to the given `Ord`).
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { reduceRightWithIndex } from '@fp-tx/core/ReadonlyRecord'
 * import { Ord } from '@fp-tx/core/string'
 *
 * const x = { c: 3, a: 'foo', b: false }
 * assert.deepStrictEqual(reduceRightWithIndex(Ord)([] as string[], (k, a, b) => [...b, `${k}-${a}`])(x), [
 *   'c-3',
 *   'b-false',
 *   'a-foo',
 * ])
 * ```
 *
 * @public
 */
export declare function reduceRightWithIndex(O: Ord<string>): <K extends string, A, B>(b: B, f: (k: K, a: A, b: B) => B) => (fa: ReadonlyRecord<K, A>) => B;
/**
 * Use the overload constrained by `Ord` instead.
 *
 * @deprecated Use the overload constrained by `Ord` instead.
 */
export declare function reduceRightWithIndex<K extends string, A, B>(b: B, f: (k: K, a: A, b: B) => B): (fa: ReadonlyRecord<K, A>) => B;
/**
 * Create a `ReadonlyRecord` with one key/value pair.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Constructors
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { singleton } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(singleton('a', 1), { a: 1 })
 * ```
 *
 * @public
 */
export declare const singleton: <A>(k: string, a: A) => Readonly<Record<string, A>>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare function traverseWithIndex<F extends URIS4>(F: Applicative4<F>): <K extends string, S, R, E, A, B>(f: (k: K, a: A) => Kind4<F, S, R, E, B>) => (ta: ReadonlyRecord<K, A>) => Kind4<F, S, R, E, ReadonlyRecord<K, B>>;
export declare function traverseWithIndex<F extends URIS3>(F: Applicative3<F>): <K extends string, R, E, A, B>(f: (k: K, a: A) => Kind3<F, R, E, B>) => (ta: ReadonlyRecord<K, A>) => Kind3<F, R, E, ReadonlyRecord<K, B>>;
export declare function traverseWithIndex<F extends URIS3, E>(F: Applicative3C<F, E>): <K extends string, R, A, B>(f: (k: K, a: A) => Kind3<F, R, E, B>) => (ta: ReadonlyRecord<K, A>) => Kind3<F, R, E, ReadonlyRecord<K, B>>;
export declare function traverseWithIndex<F extends URIS2>(F: Applicative2<F>): <K extends string, E, A, B>(f: (k: K, a: A) => Kind2<F, E, B>) => (ta: ReadonlyRecord<K, A>) => Kind2<F, E, ReadonlyRecord<K, B>>;
export declare function traverseWithIndex<F extends URIS2, E>(F: Applicative2C<F, E>): <K extends string, A, B>(f: (k: K, a: A) => Kind2<F, E, B>) => (ta: ReadonlyRecord<K, A>) => Kind2<F, E, ReadonlyRecord<K, B>>;
export declare function traverseWithIndex<F extends URIS>(F: Applicative1<F>): <K extends string, A, B>(f: (k: K, a: A) => Kind<F, B>) => (ta: ReadonlyRecord<K, A>) => Kind<F, ReadonlyRecord<K, B>>;
export declare function traverseWithIndex<F>(F: Applicative<F>): <K extends string, A, B>(f: (k: K, a: A) => HKT<F, B>) => (ta: ReadonlyRecord<K, A>) => HKT<F, ReadonlyRecord<K, B>>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare function traverse<F extends URIS4>(F: Applicative4<F>): <S, R, E, A, B>(f: (a: A) => Kind4<F, S, R, E, B>) => <K extends string>(ta: ReadonlyRecord<K, A>) => Kind4<F, S, R, E, ReadonlyRecord<K, B>>;
export declare function traverse<F extends URIS3>(F: Applicative3<F>): <R, E, A, B>(f: (a: A) => Kind3<F, R, E, B>) => <K extends string>(ta: ReadonlyRecord<K, A>) => Kind3<F, R, E, ReadonlyRecord<K, B>>;
export declare function traverse<F extends URIS3, E>(F: Applicative3C<F, E>): <R, A, B>(f: (a: A) => Kind3<F, R, E, B>) => <K extends string>(ta: ReadonlyRecord<K, A>) => Kind3<F, R, E, ReadonlyRecord<K, B>>;
export declare function traverse<F extends URIS2>(F: Applicative2<F>): <E, A, B>(f: (a: A) => Kind2<F, E, B>) => <K extends string>(ta: ReadonlyRecord<K, A>) => Kind2<F, E, ReadonlyRecord<K, B>>;
export declare function traverse<F extends URIS2, E>(F: Applicative2C<F, E>): <A, B>(f: (a: A) => Kind2<F, E, B>) => <K extends string>(ta: ReadonlyRecord<K, A>) => Kind2<F, E, ReadonlyRecord<K, B>>;
export declare function traverse<F extends URIS>(F: Applicative1<F>): <A, B>(f: (a: A) => Kind<F, B>) => <K extends string>(ta: ReadonlyRecord<K, A>) => Kind<F, ReadonlyRecord<K, B>>;
export declare function traverse<F>(F: Applicative<F>): <A, B>(f: (a: A) => HKT<F, B>) => <K extends string>(ta: ReadonlyRecord<K, A>) => HKT<F, ReadonlyRecord<K, B>>;
/**
 * `ReadonlyRecord` sequencing, i.e., take a `ReadonlyRecord` in which elements are monads and return a monad of a
 * `ReadonlyRecord` of the base types.
 *
 * The following example for instance shows sequencing a `ReadonlyRecord<string, Option<number>>` into an
 * `Option<ReadonlyRecord<string, number>>`.
 *
 * `sequence` in `ReadonlyRecord` is equivalent to `sequenceS` in `Apply.ts`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { sequence } from '@fp-tx/core/ReadonlyRecord'
 * import { option } from 'fp-ts'
 * import { sequenceS } from '@fp-tx/core/Apply'
 *
 * assert.deepStrictEqual(
 *   sequence(option.Applicative)({ a: option.some(1), b: option.some(2) }),
 *   option.some({ a: 1, b: 2 }),
 * )
 * assert.deepStrictEqual(sequence(option.Applicative)({ a: option.some(1), b: option.none }), option.none)
 * assert.deepStrictEqual(
 *   sequence(option.Applicative)({ a: option.some(1), b: option.some(2) }),
 *   sequenceS(option.Applicative)({ a: option.some(1), b: option.some(2) }),
 * )
 * ```
 *
 * @public
 */
export declare function sequence<F extends URIS3>(F: Applicative3<F>): <K extends string, R, E, A>(ta: ReadonlyRecord<K, Kind3<F, R, E, A>>) => Kind3<F, R, E, ReadonlyRecord<K, A>>;
export declare function sequence<F extends URIS3, E>(F: Applicative3C<F, E>): <K extends string, R, A>(ta: ReadonlyRecord<K, Kind3<F, R, E, A>>) => Kind3<F, R, E, ReadonlyRecord<K, A>>;
export declare function sequence<F extends URIS2>(F: Applicative2<F>): <K extends string, E, A>(ta: ReadonlyRecord<K, Kind2<F, E, A>>) => Kind2<F, E, ReadonlyRecord<K, A>>;
export declare function sequence<F extends URIS2, E>(F: Applicative2C<F, E>): <K extends string, A>(ta: ReadonlyRecord<K, Kind2<F, E, A>>) => Kind2<F, E, ReadonlyRecord<K, A>>;
export declare function sequence<F extends URIS>(F: Applicative1<F>): <K extends string, A>(ta: ReadonlyRecord<K, Kind<F, A>>) => Kind<F, ReadonlyRecord<K, A>>;
export declare function sequence<F>(F: Applicative<F>): <K extends string, A>(ta: ReadonlyRecord<K, HKT<F, A>>) => HKT<F, ReadonlyRecord<K, A>>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Filtering
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const wither: PipeableWither1<URI>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Filtering
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const wilt: PipeableWilt1<URI>;
/**
 * Maps a `ReadonlyRecord` with a function returning an `Either` and partitions the resulting `ReadonlyRecord` into
 * `Left`s and `Right`s.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { partitionMapWithIndex } from '@fp-tx/core/ReadonlyRecord'
 * import { either } from 'fp-ts'
 *
 * const f = (key: string, a: number) =>
 *   a >= 0 ? either.right(`${key} is >= 0 (${a})`) : either.left(`${key} is < 0 (${a})`)
 * assert.deepStrictEqual(partitionMapWithIndex(f)({ a: -1, b: 2, c: 123 }), {
 *   left: {
 *     a: 'a is < 0 (-1)',
 *   },
 *   right: {
 *     b: 'b is >= 0 (2)',
 *     c: 'c is >= 0 (123)',
 *   },
 * })
 * ```
 *
 * @public
 */
export declare function partitionMapWithIndex<K extends string, A, B, C>(f: (key: K, a: A) => Either<B, C>): (fa: ReadonlyRecord<K, A>) => Separated<ReadonlyRecord<string, B>, ReadonlyRecord<string, C>>;
/**
 * Partition a `ReadonlyRecord` into two parts according to a predicate that takes a key and a value.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { partitionWithIndex } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(
 *   partitionWithIndex((key: string, a: number) => key.length <= 1 && a > 0)({ a: -1, b: 2, ccc: 7 }),
 *   {
 *     left: {
 *       a: -1,
 *       ccc: 7,
 *     },
 *     right: {
 *       b: 2,
 *     },
 *   },
 * )
 * ```
 *
 * @public
 */
export declare function partitionWithIndex<K extends string, A, B extends A>(refinementWithIndex: RefinementWithIndex<K, A, B>): (fa: ReadonlyRecord<K, A>) => Separated<ReadonlyRecord<string, A>, ReadonlyRecord<string, B>>;
export declare function partitionWithIndex<K extends string, A>(predicateWithIndex: PredicateWithIndex<K, A>): <B extends A>(fb: ReadonlyRecord<K, B>) => Separated<ReadonlyRecord<string, B>, ReadonlyRecord<string, B>>;
export declare function partitionWithIndex<K extends string, A>(predicateWithIndex: PredicateWithIndex<K, A>): (fa: ReadonlyRecord<K, A>) => Separated<ReadonlyRecord<string, A>, ReadonlyRecord<string, A>>;
/**
 * Maps a `ReadonlyRecord` with an iterating function that takes key and value and returns an `Option`, keeping only the
 * `Some` values and discarding `None`s.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { filterMapWithIndex } from '@fp-tx/core/ReadonlyRecord'
 * import { option } from 'fp-ts'
 *
 * const f = (key: string, a: number) => (a >= 0 ? option.some(`${key}${a}`) : option.none)
 * assert.deepStrictEqual(filterMapWithIndex(f)({ a: -1, b: 2, c: 3 }), {
 *   b: 'b2',
 *   c: 'c3',
 * })
 * ```
 *
 * @public
 */
export declare function filterMapWithIndex<K extends string, A, B>(f: (key: K, a: A) => Option<B>): (fa: ReadonlyRecord<K, A>) => ReadonlyRecord<string, B>;
/**
 * Produce a new `ReadonlyRecord` keeping only the entries that satisfy a predicate taking key and value as input.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { filterWithIndex } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(
 *   filterWithIndex((s: string, v: number) => s.length <= 1 && v > 0)({ a: 1, b: -2, ccc: 3 }),
 *   {
 *     a: 1,
 *   },
 * )
 * ```
 *
 * @public
 */
export declare function filterWithIndex<K extends string, A, B extends A>(refinementWithIndex: RefinementWithIndex<K, A, B>): (fa: ReadonlyRecord<K, A>) => ReadonlyRecord<string, B>;
export declare function filterWithIndex<K extends string, A>(predicateWithIndex: PredicateWithIndex<K, A>): <B extends A>(fb: ReadonlyRecord<K, B>) => ReadonlyRecord<string, B>;
export declare function filterWithIndex<K extends string, A>(predicateWithIndex: PredicateWithIndex<K, A>): (fa: ReadonlyRecord<K, A>) => ReadonlyRecord<string, A>;
/**
 * Create a `ReadonlyRecord` from a foldable collection of key/value pairs, using the specified `Magma` to combine
 * values for duplicate keys.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare function fromFoldable<F extends URIS3, A>(M: Magma<A>, F: Foldable3<F>): <R, E>(fka: Kind3<F, R, E, readonly [string, A]>) => ReadonlyRecord<string, A>;
export declare function fromFoldable<F extends URIS2, A>(M: Magma<A>, F: Foldable2<F>): <E>(fka: Kind2<F, E, readonly [string, A]>) => ReadonlyRecord<string, A>;
export declare function fromFoldable<F extends URIS, A>(M: Magma<A>, F: Foldable1<F>): (fka: Kind<F, readonly [string, A]>) => ReadonlyRecord<string, A>;
export declare function fromFoldable<F, A>(M: Magma<A>, F: FoldableHKT<F>): (fka: HKT<F, readonly [string, A]>) => ReadonlyRecord<string, A>;
/**
 * Create a `ReadonlyRecord` from a foldable collection using the specified functions to:
 *
 * - Map to key/value pairs
 * - Combine values for duplicate keys.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { last } from '@fp-tx/core/Semigroup'
 * import { Foldable, zip } from '@fp-tx/core/ReadonlyArray'
 * import { identity } from '@fp-tx/core/function'
 * import { ReadonlyRecord, fromFoldableMap } from '@fp-tx/core/ReadonlyRecord'
 *
 * export const zipObject = <K extends string, A>(
 *   keys: ReadonlyArray<K>,
 *   values: ReadonlyArray<A>,
 * ): ReadonlyRecord<K, A> => fromFoldableMap(last<A>(), Foldable)(zip(keys, values), identity)
 *
 * assert.deepStrictEqual(zipObject(['a', 'b'], [1, 2, 3]), { a: 1, b: 2 })
 *
 * interface User {
 *   readonly id: string
 *   readonly name: string
 * }
 *
 * const users: ReadonlyArray<User> = [
 *   { id: 'id1', name: 'name1' },
 *   { id: 'id2', name: 'name2' },
 *   { id: 'id1', name: 'name3' },
 * ]
 *
 * assert.deepStrictEqual(
 *   fromFoldableMap(last<User>(), Foldable)(users, user => [user.id, user]),
 *   {
 *     id1: { id: 'id1', name: 'name3' },
 *     id2: { id: 'id2', name: 'name2' },
 *   },
 * )
 * ```
 *
 * @public
 */
export declare function fromFoldableMap<F extends URIS3, B>(M: Magma<B>, F: Foldable3<F>): <R, E, A>(fa: Kind3<F, R, E, A>, f: (a: A) => readonly [string, B]) => ReadonlyRecord<string, B>;
export declare function fromFoldableMap<F extends URIS2, B>(M: Magma<B>, F: Foldable2<F>): <E, A>(fa: Kind2<F, E, A>, f: (a: A) => readonly [string, B]) => ReadonlyRecord<string, B>;
export declare function fromFoldableMap<F extends URIS, B>(M: Magma<B>, F: Foldable1<F>): <A>(fa: Kind<F, A>, f: (a: A) => readonly [string, B]) => ReadonlyRecord<string, B>;
export declare function fromFoldableMap<F, B>(M: Magma<B>, F: FoldableHKT<F>): <A>(fa: HKT<F, A>, f: (a: A) => readonly [string, B]) => ReadonlyRecord<string, B>;
/**
 * Alias of [`toReadonlyArray`](#toreadonlyarray).
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Conversions
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { toEntries } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(toEntries({ b: 2, a: 1 }), [
 *   ['a', 1],
 *   ['b', 2],
 * ])
 * ```
 *
 * @public
 */
export declare const toEntries: <K extends string, A>(r: Readonly<Record<K, A>>) => readonly (readonly [K, A])[];
/**
 * Converts a `ReadonlyArray` of `[key, value]` tuples into a `ReadonlyRecord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Conversions
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { fromEntries } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(
 *   fromEntries([
 *     ['a', 1],
 *     ['b', 2],
 *     ['a', 3],
 *   ]),
 *   { b: 2, a: 3 },
 * )
 * ```
 *
 * @public
 */
export declare const fromEntries: <A>(fa: readonly (readonly [string, A])[]) => Readonly<Record<string, A>>;
/**
 * Test if every value in a `ReadonlyRecord` satisfies the predicate.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { every } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(every((n: number) => n >= 0)({ a: 1, b: 2 }), true)
 * assert.deepStrictEqual(every((n: number) => n >= 0)({ a: 1, b: -1 }), false)
 * ```
 *
 * @public
 */
export declare function every<A, B extends A>(refinement: Refinement<A, B>): Refinement<ReadonlyRecord<string, A>, ReadonlyRecord<string, B>>;
export declare function every<A>(predicate: Predicate<A>): Predicate<ReadonlyRecord<string, A>>;
/**
 * Test if at least one value in a `ReadonlyRecord` satisfies the predicate.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { some } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(some((n: number) => n >= 0)({ a: 1, b: -2 }), true)
 * assert.deepStrictEqual(some((n: number) => n >= 0)({ a: -1, b: -2 }), false)
 * ```
 *
 * @public
 */
export declare function some<A>(predicate: (a: A) => boolean): (r: ReadonlyRecord<string, A>) => boolean;
/**
 * Given an `Eq` checks if a `ReadonlyRecord` contains an entry with value equal to a provided value.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { elem } from '@fp-tx/core/ReadonlyRecord'
 * import { number } from 'fp-ts'
 *
 * assert.deepStrictEqual(elem(number.Eq)(123, { foo: 123, bar: 234 }), true)
 * assert.deepStrictEqual(elem(number.Eq)(-7, { foo: 123, bar: 234 }), false)
 * ```
 *
 * @public
 */
export declare function elem<A>(E: Eq<A>): {
    (a: A): (fa: ReadonlyRecord<string, A>) => boolean;
    (a: A, fa: ReadonlyRecord<string, A>): boolean;
};
/**
 * Union of two `ReadonlyRecord`s. Takes two `ReadonlyRecord`s and produces a `ReadonlyRecord` combining all the entries
 * of the two inputs. It uses the `concat` function of the provided `Magma` to combine the elements with the same key.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { union } from '@fp-tx/core/ReadonlyRecord'
 * import { Magma } from '@fp-tx/core/Magma'
 *
 * const m1: Magma<number> = { concat: (x: number, y: number) => x + y }
 * assert.deepStrictEqual(union(m1)({ a: 3, c: 3 })({ a: 1, b: 2 }), { a: 4, b: 2, c: 3 })
 * const m2: Magma<number> = { concat: (x: number) => x }
 * assert.deepStrictEqual(union(m2)({ a: 3, c: 3 })({ a: 1, b: 2 }), { a: 1, b: 2, c: 3 })
 * ```
 *
 * @public
 */
export declare const union: <A>(M: Magma<A>) => (second: Readonly<Record<string, A>>) => (first: Readonly<Record<string, A>>) => Readonly<Record<string, A>>;
/**
 * Intersection of two `ReadonlyRecord`s. Takes two `ReadonlyRecord`s and produces a `ReadonlyRecord` combining only the
 * entries of the two inputswith the same key. It uses the `concat` function of the provided `Magma` to combine the
 * elements.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { intersection } from '@fp-tx/core/ReadonlyRecord'
 * import { Magma } from '@fp-tx/core/Magma'
 *
 * const m1: Magma<number> = { concat: (x: number, y: number) => x + y }
 * assert.deepStrictEqual(intersection(m1)({ a: 3, c: 3 })({ a: 1, b: 2 }), { a: 4 })
 * const m2: Magma<number> = { concat: (x: number) => x }
 * assert.deepStrictEqual(intersection(m2)({ a: 3, c: 3 })({ a: 1, b: 2 }), { a: 1 })
 * ```
 *
 * @public
 */
export declare const intersection: <A>(M: Magma<A>) => (second: Readonly<Record<string, A>>) => (first: Readonly<Record<string, A>>) => Readonly<Record<string, A>>;
/**
 * Difference between two `ReadonlyRecord`s. Takes two `ReadonlyRecord`s and produces a `ReadonlyRecord` composed by the
 * entries of the two inputs, removing the entries with the same key in both inputs.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { difference } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(difference({ a: 1 })({ a: 1, b: 2 }), { b: 2 })
 * assert.deepStrictEqual(difference({ a: 3 })({ a: 1, b: 2 }), { b: 2 })
 * assert.deepStrictEqual(difference({ a: 3, c: 3 })({ a: 1, b: 2 }), { b: 2, c: 3 })
 * ```
 *
 * @public
 */
export declare const difference: <A>(second: Readonly<Record<string, A>>) => (first: Readonly<Record<string, A>>) => Readonly<Record<string, A>>;
/** @internal */
export declare const _map: Functor1<URI>['map'];
/** @internal */
export declare const _mapWithIndex: FunctorWithIndex1<URI, string>['mapWithIndex'];
/** @internal */
export declare const _reduce: (O: Ord<string>) => Foldable1<URI>['reduce'];
/** @internal */
export declare const _foldMap: (O: Ord<string>) => Foldable1<URI>['foldMap'];
/** @internal */
export declare const _reduceRight: (O: Ord<string>) => Foldable1<URI>['reduceRight'];
/** @internal */
export declare const _filter: <A>(fa: Readonly<Record<string, A>>, predicate: Predicate<A>) => Readonly<Record<string, A>>;
/** @internal */
export declare const _filterMap: Filterable1<URI>['filterMap'];
/** @internal */
export declare const _partition: <A>(fa: Readonly<Record<string, A>>, predicate: Predicate<A>) => Separated<Readonly<Record<string, A>>, Readonly<Record<string, A>>>;
/** @internal */
export declare const _partitionMap: Filterable1<URI>['partitionMap'];
/** @internal */
export declare const _reduceWithIndex: (O: Ord<string>) => FoldableWithIndex1<URI, string>['reduceWithIndex'];
/** @internal */
export declare const _foldMapWithIndex: (O: Ord<string>) => FoldableWithIndex1<URI, string>['foldMapWithIndex'];
/** @internal */
export declare const _reduceRightWithIndex: (O: Ord<string>) => FoldableWithIndex1<URI, string>['reduceRightWithIndex'];
/** @internal */
export declare const _partitionMapWithIndex: <A, B, C>(fa: Readonly<Record<string, A>>, f: (key: string, a: A) => Either<B, C>) => Separated<Readonly<Record<string, B>>, Readonly<Record<string, C>>>;
/** @internal */
export declare const _partitionWithIndex: <A>(fa: Readonly<Record<string, A>>, predicateWithIndex: PredicateWithIndex<string, A>) => Separated<Readonly<Record<string, A>>, Readonly<Record<string, A>>>;
/** @internal */
export declare const _filterMapWithIndex: <A, B>(fa: Readonly<Record<string, A>>, f: (key: string, a: A) => Option<B>) => Readonly<Record<string, B>>;
/** @internal */
export declare const _filterWithIndex: <A>(fa: Readonly<Record<string, A>>, predicateWithIndex: PredicateWithIndex<string, A>) => Readonly<Record<string, A>>;
/** @internal */
export declare const _traverse: (O: Ord<string>) => <F>(F: Applicative<F>) => <A, B>(ta: Readonly<Record<string, A>>, f: (a: A) => HKT<F, B>) => HKT<F, Readonly<Record<string, B>>>;
/** @internal */
export declare const _sequence: (O: Ord<string>) => <F>(F: Applicative<F>) => <A>(ta: Readonly<Record<string, HKT<F, A>>>) => HKT<F, Readonly<Record<string, A>>>;
/**
 * Given a `Predicate`, it produces a new `ReadonlyRecord` keeping only the entries with a value that satisfies the
 * provided predicate.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Filtering
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { filter } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(filter((s: string) => s.length < 4)({ a: 'foo', b: 'bar', c: 'verylong' }), {
 *   a: 'foo',
 *   b: 'bar',
 * })
 * ```
 *
 * @public
 */
export declare const filter: {
    <A, B extends A>(refinement: Refinement<A, B>): (fa: ReadonlyRecord<string, A>) => ReadonlyRecord<string, B>;
    <A>(predicate: Predicate<A>): <B extends A>(fb: ReadonlyRecord<string, B>) => ReadonlyRecord<string, B>;
    <A>(predicate: Predicate<A>): (fa: ReadonlyRecord<string, A>) => ReadonlyRecord<string, A>;
};
/**
 * Maps a `ReadonlyRecord` with an iterating function that returns an `Option` and it keeps only the `Some` values
 * discarding the `None`s.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Filtering
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { filterMap } from '@fp-tx/core/ReadonlyRecord'
 * import { option } from 'fp-ts'
 *
 * const f = (s: string) => (s.length < 4 ? option.some(`${s} is short`) : option.none)
 * assert.deepStrictEqual(filterMap(f)({ a: 'foo', b: 'bar', c: 'verylong' }), {
 *   a: 'foo is short',
 *   b: 'bar is short',
 * })
 * ```
 *
 * @public
 */
export declare const filterMap: <A, B>(f: (a: A) => Option<B>) => (fa: ReadonlyRecord<string, A>) => ReadonlyRecord<string, B>;
/**
 * Partition a `ReadonlyRecord` into two parts according to a `Predicate`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Filtering
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { partition } from '@fp-tx/core/ReadonlyRecord'
 *
 * assert.deepStrictEqual(partition((s: string) => s.length < 4)({ a: 'foo', b: 'bar', c: 'verylong' }), {
 *   left: {
 *     c: 'verylong',
 *   },
 *   right: {
 *     a: 'foo',
 *     b: 'bar',
 *   },
 * })
 * ```
 *
 * @public
 */
export declare const partition: {
    <A, B extends A>(refinement: Refinement<A, B>): (fa: ReadonlyRecord<string, A>) => Separated<ReadonlyRecord<string, A>, ReadonlyRecord<string, B>>;
    <A>(predicate: Predicate<A>): <B extends A>(fb: ReadonlyRecord<string, B>) => Separated<ReadonlyRecord<string, B>, ReadonlyRecord<string, B>>;
    <A>(predicate: Predicate<A>): (fa: ReadonlyRecord<string, A>) => Separated<ReadonlyRecord<string, A>, ReadonlyRecord<string, A>>;
};
/**
 * Maps a `ReadonlyRecord` with a function returning an `Either` and partitions the resulting `ReadonlyRecord` into
 * `Left`s and `Right`s.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Filtering
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { partitionMap } from '@fp-tx/core/ReadonlyRecord'
 * import { either } from 'fp-ts'
 *
 * const f = (s: string) => (s.length < 4 ? either.right(`${s} is short`) : either.left(`${s} is not short`))
 * assert.deepStrictEqual(partitionMap(f)({ a: 'foo', b: 'bar', c: 'verylong' }), {
 *   left: {
 *     c: 'verylong is not short',
 *   },
 *   right: {
 *     a: 'foo is short',
 *     b: 'bar is short',
 *   },
 * })
 * ```
 *
 * @public
 */
export declare const partitionMap: <A, B, C>(f: (a: A) => Either<B, C>) => (fa: ReadonlyRecord<string, A>) => Separated<ReadonlyRecord<string, B>, ReadonlyRecord<string, C>>;
/**
 * Reduces a `ReadonlyRecord` passing each value to the iterating function. Entries are processed in order, sorted by
 * key according to the given `Ord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Folding
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { reduce } from '@fp-tx/core/ReadonlyRecord'
 * import { Ord } from '@fp-tx/core/string'
 *
 * const x = { c: 3, a: 'foo', b: false }
 * assert.deepStrictEqual(reduce(Ord)([] as string[], (b, a) => [...b, `-${a}-`])(x), ['-foo-', '-false-', '-3-'])
 * ```
 *
 * @public
 */
export declare function reduce(O: Ord<string>): <A, B>(b: B, f: (b: B, a: A) => B) => (fa: ReadonlyRecord<string, A>) => B;
/**
 * Use the overload constrained by `Ord` instead.
 *
 * @deprecated Use the overload constrained by `Ord` instead.
 */
export declare function reduce<A, B>(b: B, f: (b: B, a: A) => B): (fa: ReadonlyRecord<string, A>) => B;
/**
 * Map and fold a `ReadonlyRecord`. Map the `ReadonlyRecord` passing each value to the iterating function. Then fold the
 * results using the provided `Monoid`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Folding
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { foldMap } from '@fp-tx/core/ReadonlyRecord'
 * import { Ord } from '@fp-tx/core/string'
 * import { Monoid } from '@fp-tx/core/Monoid'
 *
 * const m: Monoid<string> = { empty: '', concat: (x: string, y: string) => (x ? `${x} -> ${y}` : `${y}`) }
 * const f = (a: number) => `-${a}-`
 * const x = { c: 3, a: 1, b: 2 }
 * assert.deepStrictEqual(foldMap(Ord)(m)(f)(x), '-1- -> -2- -> -3-')
 * ```
 *
 * @public
 */
export declare function foldMap(O: Ord<string>): <M>(M: Monoid<M>) => <A>(f: (a: A) => M) => (fa: ReadonlyRecord<string, A>) => M;
/**
 * Use the overload constrained by `Ord` instead.
 *
 * @deprecated Use the overload constrained by `Ord` instead.
 */
export declare function foldMap<M>(M: Monoid<M>): <A>(f: (a: A) => M) => (fa: ReadonlyRecord<string, A>) => M;
/**
 * Same as `reduce` but entries are processed _from the right_, i.e. in reverse order, from the last to the first entry,
 * according to the given `Ord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Folding
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { reduceRight } from '@fp-tx/core/ReadonlyRecord'
 * import { Ord } from '@fp-tx/core/string'
 *
 * const x = { c: 3, a: 'foo', b: false }
 * assert.deepStrictEqual(reduceRight(Ord)([] as string[], (a, b) => [...b, `-${a}-`])(x), [
 *   '-3-',
 *   '-false-',
 *   '-foo-',
 * ])
 * ```
 *
 * @public
 */
export declare function reduceRight(O: Ord<string>): <A, B>(b: B, f: (a: A, b: B) => B) => (fa: ReadonlyRecord<string, A>) => B;
/**
 * Use the overload constrained by `Ord` instead.
 *
 * @deprecated Use the overload constrained by `Ord` instead.
 */
export declare function reduceRight<A, B>(b: B, f: (a: A, b: B) => B): (fa: ReadonlyRecord<string, A>) => B;
/**
 * Compact a `ReadonlyRecord` of `Option`s discarding the `None` values and keeping the `Some` values.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Filtering
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { compact } from '@fp-tx/core/ReadonlyRecord'
 * import { option } from 'fp-ts'
 *
 * assert.deepStrictEqual(compact({ a: option.some('foo'), b: option.none, c: option.some('bar') }), {
 *   a: 'foo',
 *   c: 'bar',
 * })
 * ```
 *
 * @public
 */
export declare const compact: <A>(r: Readonly<Record<string, Option<A>>>) => Readonly<Record<string, A>>;
/**
 * Separate a `ReadonlyRecord` of `Either`s into `Left`s and `Right`s.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Filtering
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { separate } from '@fp-tx/core/ReadonlyRecord'
 * import { either } from 'fp-ts'
 *
 * assert.deepStrictEqual(separate({ a: either.right('foo'), b: either.left('bar'), c: either.right('baz') }), {
 *   right: {
 *     a: 'foo',
 *     c: 'baz',
 *   },
 *   left: {
 *     b: 'bar',
 *   },
 * })
 * ```
 *
 * @public
 */
export declare const separate: <A, B>(r: Readonly<Record<string, Either<A, B>>>) => Separated<Readonly<Record<string, A>>, Readonly<Record<string, B>>>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Type lambdas
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const URI = "ReadonlyRecord";
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Type lambdas
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export type URI = typeof URI;
declare module "./HKT.js" {
    interface URItoKind<A> {
        readonly [URI]: ReadonlyRecord<string, A>;
    }
}
/**
 * Produces a `Show` for a `ReadonlyRecord`, given a `Show` for the base type (a `Show` produces a human-readable
 * representation of an instance). `ReadonlyRecord` entries are sorted by key with the provided `Ord`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { getShow, ReadonlyRecord } from '@fp-tx/core/ReadonlyRecord'
 * import { Show } from '@fp-tx/core/Show'
 * import { Ord } from '@fp-tx/core/string'
 *
 * const sNumber: Show<number> = { show: (n: number) => `${n}` }
 * const sRecord: Show<ReadonlyRecord<string, number>> = getShow(Ord)(sNumber)
 * assert.deepStrictEqual(sRecord.show({ b: 2, a: 1 }), '{ "a": 1, "b": 2 }')
 * ```
 *
 * @public
 */
export declare function getShow(O: Ord<string>): <A>(S: Show<A>) => Show<ReadonlyRecord<string, A>>;
/**
 * Use the overload constrained by `Ord` instead.
 *
 * @deprecated Zone of Death
 */
export declare function getShow<A>(S: Show<A>): Show<ReadonlyRecord<string, A>>;
/**
 * Given an `Eq` for the base type, it produces an `Eq` for a `ReadonlyRecord` of that base type.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { getEq, ReadonlyRecord } from '@fp-tx/core/ReadonlyRecord'
 * import { string } from 'fp-ts'
 * import { Eq } from '@fp-tx/core/Eq'
 *
 * const eq: Eq<ReadonlyRecord<string, string>> = getEq(string.Eq)
 * assert.deepStrictEqual(eq.equals({ a: 'foo' }, { b: 'bar' }), false)
 * assert.deepStrictEqual(eq.equals({ a: 'foo' }, { a: 'foo' }), true)
 * ```
 *
 * @public
 */
export declare function getEq<K extends string, A>(E: Eq<A>): Eq<ReadonlyRecord<K, A>>;
/**
 * Returns a `Monoid` instance for `ReadonlyRecord`s, given a `Semigroup` instance for the base type. The `Monoid` makes
 * the union of two `ReadonlyRecord`s comining the overlapping entries with the provided `Semigroup`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { SemigroupSum } from '@fp-tx/core/number'
 * import { getMonoid } from '@fp-tx/core/ReadonlyRecord'
 *
 * const M = getMonoid(SemigroupSum)
 * assert.deepStrictEqual(M.concat({ foo: 123, bar: 234 }, { foo: 456, baz: 567 }), {
 *   foo: 579,
 *   bar: 234,
 *   baz: 567,
 * })
 * ```
 *
 * @public
 */
export declare function getMonoid<K extends string, A>(S: Semigroup<A>): Monoid<ReadonlyRecord<K, A>>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const Functor: Functor1<URI>;
/**
 * Takes a value and a `ReadonlyRecord` of functions and returns a `ReadonlyRecord` by applying each function to the
 * input value.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Mapping
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { flap } from '@fp-tx/core/ReadonlyRecord'
 *
 * const fab = { x: (n: number) => `${n} times 2`, y: (n: number) => `${n * 2}` }
 * assert.deepStrictEqual(flap(3)(fab), {
 *   x: '3 times 2',
 *   y: '6',
 * })
 * ```
 *
 * @public
 */
export declare const flap: <A>(a: A) => <B>(fab: Readonly<Record<string, (a: A) => B>>) => Readonly<Record<string, B>>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const FunctorWithIndex: FunctorWithIndex1<URI, string>;
/**
 * Produces a `Foldable` instance for a `ReadonlyRecord`, using the provided `Ord` to sort the `ReadonlyRecord`'s
 * entries by key.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Folding
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const getFoldable: (O: Ord<string>) => Foldable1<URI>;
/**
 * Produces a `FoldableWithIndex1` instance for a `ReadonlyRecord`, using the provided `Ord` to sort the
 * `ReadonlyRecord`'s entries by key.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Folding
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const getFoldableWithIndex: (O: Ord<string>) => FoldableWithIndex1<URI, string>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const Compactable: Compactable1<URI>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const Filterable: Filterable1<URI>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const FilterableWithIndex: FilterableWithIndex1<URI, string>;
/**
 * Produces a `Traversable` instance for a `ReadonlyRecord`, using the provided `Ord` to sort the `ReadonlyRecord`'s
 * entries by key.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Traversing
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const getTraversable: (O: Ord<string>) => Traversable1<URI>;
/**
 * Produces a `TraversableWithIndex` instance for a `ReadonlyRecord`, using the provided `Ord` to sort the
 * `ReadonlyRecord`'s entries by key.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Traversing
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const getTraversableWithIndex: (O: Ord<string>) => TraversableWithIndex1<URI, string>;
/**
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Filtering
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @public
 */
export declare const getWitherable: (O: Ord<string>) => Witherable1<URI>;
/**
 * Given a `Semigroup` in the base type, it produces a `Semigroup` in the `ReadonlyRecord` of the base type. The
 * resulting `Semigroup` concatenates two `ReadonlyRecord`s by `union`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { getUnionSemigroup, ReadonlyRecord } from '@fp-tx/core/ReadonlyRecord'
 * import { Semigroup } from '@fp-tx/core/Semigroup'
 *
 * const sNumber: Semigroup<number> = { concat: (x, y) => x - y }
 * const sReadonlyRecord: Semigroup<ReadonlyRecord<string, number>> = getUnionSemigroup(sNumber)
 * assert.deepStrictEqual(sReadonlyRecord.concat({ a: 1, b: 2 }, { b: 3, c: 4 }), { a: 1, b: -1, c: 4 })
 * ```
 *
 * @public
 */
export declare const getUnionSemigroup: <A>(S: Semigroup<A>) => Semigroup<Readonly<Record<string, A>>>;
/**
 * Same as `getMonoid`. Returns a `Monoid` instance for `ReadonlyRecord`s given a `Semigroup` instance for the base
 * type. The `Monoid` makes the union of two `ReadonlyRecord`s combining the entries that have the same key with the
 * provided `Semigroup`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { SemigroupSum } from '@fp-tx/core/number'
 * import { getUnionMonoid } from '@fp-tx/core/ReadonlyRecord'
 *
 * const M = getUnionMonoid(SemigroupSum)
 * assert.deepStrictEqual(M.concat({ foo: 123, bar: 234 }, { foo: 456, baz: 567 }), {
 *   foo: 579,
 *   bar: 234,
 *   baz: 567,
 * })
 * ```
 *
 * @public
 */
export declare const getUnionMonoid: <A>(S: Semigroup<A>) => Monoid<Readonly<Record<string, A>>>;
/**
 * Given a `Semigroup` in the base type, it produces a `Semigroup` in the `ReadonlyRecord` of the base type. The
 * resulting `Semigroup` concatenates two `ReadonlyRecord`s by `intersection`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { getIntersectionSemigroup, ReadonlyRecord } from '@fp-tx/core/ReadonlyRecord'
 * import { Semigroup } from '@fp-tx/core/Semigroup'
 *
 * const sNumber: Semigroup<number> = { concat: (x, y) => x - y }
 * const sReadonlyRecord: Semigroup<ReadonlyRecord<string, number>> = getIntersectionSemigroup(sNumber)
 * assert.deepStrictEqual(sReadonlyRecord.concat({ a: 1, b: 2 }, { b: 3, c: 4 }), { b: -1 })
 * ```
 *
 * @public
 */
export declare const getIntersectionSemigroup: <A>(S: Semigroup<A>) => Semigroup<Readonly<Record<string, A>>>;
/**
 * Produces a `Magma` with a `concat` function that combines two `ReadonlyRecord`s by making the `difference`.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Category: Instances
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @example
 *
 * ```typescript
 * import { getDifferenceMagma, difference, ReadonlyRecord } from '@fp-tx/core/ReadonlyRecord'
 * import { Magma } from '@fp-tx/core/Magma'
 *
 * const r1 = { a: 3, c: 3 }
 * const r2 = { a: 1, b: 2 }
 * const m: Magma<ReadonlyRecord<string, number>> = getDifferenceMagma<number>()
 * assert.deepStrictEqual(m.concat(r1, r2), difference(r2)(r1))
 * assert.deepStrictEqual(m.concat(r1, r2), { c: 3, b: 2 })
 * ```
 *
 * @public
 */
export declare const getDifferenceMagma: <A>() => Magma<Readonly<Record<string, A>>>;
/**
 * Use `getFoldable` instead.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @deprecated Zone of Death
 * @public
 */
export declare const Foldable: Foldable1<URI>;
/**
 * Use `getFoldableWithIndex` instead.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @deprecated Zone of Death
 * @public
 */
export declare const FoldableWithIndex: FoldableWithIndex1<URI, string>;
/**
 * Use `getTraversable` instead.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @deprecated Zone of Death
 * @public
 */
export declare const Traversable: Traversable1<URI>;
/**
 * Use `getTraversableWithIndex` instead.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @deprecated Zone of Death
 * @public
 */
export declare const TraversableWithIndex: TraversableWithIndex1<URI, string>;
/**
 * Use `getWitherable` instead.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @deprecated Zone of Death
 * @public
 */
export declare const Witherable: Witherable1<URI>;
/**
 * Use [`upsertAt`](#upsertat) instead.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @deprecated Zone of Death
 * @public
 */
export declare const insertAt: <A>(k: string, a: A) => (r: ReadonlyRecord<string, A>) => ReadonlyRecord<string, A>;
/**
 * Use [`has`](#has) instead.
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @deprecated Zone of Death
 * @public
 */
export declare function hasOwnProperty<K extends string>(k: string, r: ReadonlyRecord<K, unknown>): k is K;
/**
 * This instance is deprecated, use small, specific instances instead. For example if a function needs a `Functor`
 * instance, pass `RR.Functor` instead of `RR.readonlyRecord`
 *
 * @remarks
 * Added in 1.0.0
 * @remarks
 * Original License: MIT – Copyright (c) 2017-present Giulio Canti
 * @deprecated Zone of Death
 * @public
 */
export declare const readonlyRecord: FunctorWithIndex1<URI, string> & FoldableWithIndex1<URI, string> & FilterableWithIndex1<URI, string> & TraversableWithIndex1<URI, string> & Witherable1<URI>;
//# sourceMappingURL=ReadonlyRecord.d.ts.map