/**
* Utility functions to accommodate `fp-ts/Option`.
*
* @since 0.1.0
*/
import type { Endomorphism } from "fp-ts/Endomorphism";
import type { Eq } from "fp-ts/Eq";
import type { Option } from "fp-ts/Option";
import * as O from "fp-ts/Option";
import * as L from "./Lazy";
type Lazy = L.Lazy;
import type { Bounded } from "fp-ts/Bounded";
import type { Enum } from "./Enum";
/**
* Unwrap the value from within an `Option`, throwing `msg` if `None`.
*
* @example
* import { unsafeExpect } from 'fp-ts-std/Option'
* import * as O from 'fp-ts/Option'
*
* assert.throws(
* () => unsafeExpect('foo')(O.none),
* Error('Unwrapped `None`', { cause: Error('foo') }),
* )
*
* @category 3 Functions
* @since 0.16.0
*/
export declare const unsafeExpect: (msg: string) => (x: Option) => A;
/**
* Unwrap the value from within an `Option`, throwing if `None`.
*
* @example
* import { unsafeUnwrap } from 'fp-ts-std/Option'
* import * as O from 'fp-ts/Option'
*
* assert.deepStrictEqual(unsafeUnwrap(O.some(5)), 5)
*
* @category 3 Functions
* @since 0.1.0
*/
export declare const unsafeUnwrap: (x: Option) => A;
/**
* A thunked `None` constructor. Enables specifying the type of the `Option`
* without a type assertion. Helpful in certain circumstances in which type
* inferrence isn't smart enough to unify with the `Option` of the
* standard `None` constructor.
*
* @example
* import { noneAs } from 'fp-ts-std/Option'
* import * as O from 'fp-ts/Option'
*
* assert.deepStrictEqual(noneAs(), O.none)
*
* @category 3 Functions
* @since 0.12.0
*/
export declare const noneAs: () => Option;
/**
* Given an unwrapped value and an associated `Eq` instance for determining
* equivalence, inverts an `Option` that may contain the same value, something
* else, or nothing.
*
* This can be useful for circumstances in which you want to in a sense toggle
* an `Option` value.
*
* @example
* import { invert } from 'fp-ts-std/Option'
* import * as O from 'fp-ts/Option'
* import * as S from 'fp-ts/string'
*
* const f = invert(S.Eq)('x')
*
* assert.deepStrictEqual(f(O.none), O.some('x'))
* assert.deepStrictEqual(f(O.some('y')), O.some('x'))
* assert.deepStrictEqual(f(O.some('x')), O.none)
*
* @category 3 Functions
* @since 0.12.0
*/
export declare const invert: (eq: Eq) => (val: A) => Endomorphism