/** * Utility functions to accommodate `fp-ts/ReaderIO`. * * @since 0.16.0 */ import type { IO } from "fp-ts/IO"; import type { ReaderIO } from "fp-ts/ReaderIO"; /** * Runs a `ReaderIO` and extracts the final `IO` from it. * * @example * import { runReaderIO } from 'fp-ts-std/ReaderIO' * import { pipe } from "fp-ts/function" * import * as RIO from "fp-ts/ReaderIO" * * assert.strictEqual( * pipe( * RIO.of(123), * runReaderIO("env"), * )(), * 123, * ) * * @category 3 Functions * @since 0.16.0 */ export declare const runReaderIO: (r: R) => (m: ReaderIO) => IO; /** * Effectfully accesses the environment outside of the `Reader` layer. * * @example * import { asksIO } from 'fp-ts-std/ReaderIO' * * const lucky = asksIO(n => () => n === Date.now()) * * assert.strictEqual( * lucky(42)(), * false, * ) * * @category 3 Functions * @since 0.16.0 */ export declare const asksIO: (f: (r: R) => IO) => ReaderIO; //# sourceMappingURL=ReaderIO.d.ts.map