import { type AsymmetricMatcher } from './shared/predicates'; import type { MatcherResult } from './shared/types'; declare global { namespace jest { interface Matchers { toMatchRight(expected: unknown): R; } } } /** * Asserts that the right side of an `Either` matches a value, partial object, * or regular expression. * * @typeParam R Type of the right value contained in the `Either`. * * @param expected Pattern, partial object, or asymmetric matcher for the right. * * @example * ```typescript * import { right } from 'fp-ts/lib/Either' * * test('passes when right of Either matches an object', () => { * const actual = right({ test: 'ok', foo: 'bar' }) * expect(actual).toMatchRight({ test: 'ok' }) * }) * * test('passes when right of Either does not match an object', () => { * const actual = right({ test: 'unexpected', foo: 'bar' }) * expect(actual).not.toMatchRight({ test: 'ok' }) * }) * ``` */ export declare function toMatchRight(actual: unknown, expected: RegExp | AsymmetricMatcher): MatcherResult; export declare function toMatchRight(actual: unknown, expected: Partial | AsymmetricMatcher): MatcherResult;