Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
enzyme-react-intl.d.ts
declare module "enzyme-react-intl" {
import {Component, ReactElement} from "react";
import {MountRendererProps, ReactWrapper} from "enzyme";
export function loadTranslation(localeFilePath: string): { [key: string]: string };
export function loadTranslationObject(translations: { [key: string]: string }): { [key: string]: string };
export function shallowWithIntl<C extends Component, P = Component["props"], S = Component["state"]>(
node: ReactElement<P>): ReactWrapper<P, S, C>;
export function mountWithIntl<C extends Component, P = Component["props"], S = Component["state"]>(
node: ReactElement<P>,
options?: MountRendererProps): ReactWrapper<P, S, C>;
export function renderWithIntl<C extends Component, P = Component["props"], S = Component["state"]>(
node: ReactElement<P>,
options?: MountRendererProps): ReactWrapper<P, S, C>;
export function getLocale(): string;
export function setLocale(str: string): void;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.