// Type definitions for i18n/Text import * as React from "react"; type Omit = Pick>; type Merge = Omit> & N; export interface TextDecoratorConfig extends Object { /** * Configures the translated text passed to the wrapped component. */ mapPropsToText?: { [key: string]: string | object }; } export interface TextDecoratorProps { /** * Passed to the wrapped component. * * If `mapPropsToText` is `null` and `children` is a string, the string will be translated before being passed to the wrapped component. */ children?: any; /** * The locale for translation. * * If not supplied, the current locale is used. */ locale?: string; } export function TextDecorator

( config: TextDecoratorConfig, Component: React.ComponentType

| string, ): React.ComponentType

; export function TextDecorator

( Component: React.ComponentType

| string, ): React.ComponentType

; export interface TextProps extends TextDecoratorProps { /** * The string to be translated. */ children?: string; } /** * Translates its child string value in the current locale. * * If translations are not available yet, `Text` will render nothing. Once translations are available, the component will update with the translated string. * ``` Go ``` */ export class Text extends React.Component< Merge, TextProps> > {} export default Text;