import type { RemoteComponentType, PropsForRemoteComponent, } from '@remote-ui/core'; import type {Node} from '../types'; import {toHaveRemoteProps} from './props'; import { toContainRemoteComponent, toContainRemoteComponentTimes, } from './components'; import {toContainRemoteText} from './text'; type PropsFromNode = NonNullable extends Node ? U : never; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace jest { // eslint-disable-next-line @typescript-eslint/ban-types interface Matchers { toHaveRemoteProps(props: Partial>): void; toContainRemoteComponent< Type extends RemoteComponentType, >( type: Type, props?: Partial>, ): void; toContainRemoteComponentTimes< Type extends RemoteComponentType, >( type: Type, times: number, props?: Partial>, ): void; toContainRemoteText(text: string): void; } } } expect.extend({ toHaveRemoteProps, toContainRemoteComponent, toContainRemoteComponentTimes, toContainRemoteText, });