diff --git a/src/matchers/extend-expect.d.ts b/src/matchers/extend-expect.d.ts index 7d76db0c..d8335892 100644 --- a/src/matchers/extend-expect.d.ts +++ b/src/matchers/extend-expect.d.ts @@ -1,8 +1,5 @@ import type { StyleProp } from 'react-native'; import type { ReactTestInstance } from 'react-test-renderer'; -import type { TextMatch, TextMatchOptions } from '../matches'; -import type { AccessibilityValueMatcher } from '../helpers/matchers/match-accessibility-value'; -import type { Style } from './to-have-style'; export interface JestNativeMatchers { toBeOnTheScreen(): R; @@ -38,3 +35,22 @@ declare module '@jest/expect' { interface Matchers> extends JestNativeMatchers {} } + +// Used types + +export type Style = ViewStyle | TextStyle | ImageStyle; + +export interface AccessibilityValueMatcher { + min?: number; + max?: number; + now?: number; + text?: TextMatch; +} + +export type TextMatch = string | RegExp; +export type TextMatchOptions = { + exact?: boolean; + normalizer?: NormalizerFn; +}; + +export type NormalizerFn = (textToNormalize: string) => string;