diff --git a/scm-ui-components/packages/ui-components/flow-typed/npm/react-i18next_v7.x.x.js b/scm-ui-components/packages/ui-components/flow-typed/npm/react-i18next_v7.x.x.js new file mode 100644 index 0000000000..93d27674d7 --- /dev/null +++ b/scm-ui-components/packages/ui-components/flow-typed/npm/react-i18next_v7.x.x.js @@ -0,0 +1,95 @@ +// flow-typed signature: 65d42f62f8de603dcc631ea5a6b00580 +// flow-typed version: f3f13164e0/react-i18next_v7.x.x/flow_>=v0.64.x + +declare module "react-i18next" { + declare type TFunction = (key?: ?string, data?: ?Object) => string; + + declare type TranslatorProps = {| + t: TFunction, + i18nLoadedAt: Date, + i18n: Object + |}; + + declare type TranslatorPropsVoid = { + t: TFunction | void, + i18nLoadedAt: Date | void, + i18n: Object | void + }; + + declare type Translator> = ( + WrappedComponent: Component + ) => React$ComponentType< + $Diff, TranslatorPropsVoid> + >; + + declare type TranslateOptions = $Shape<{ + wait: boolean, + nsMode: "default" | "fallback", + bindi18n: false | string, + bindStore: false | string, + withRef: boolean, + translateFuncName: string, + i18n: Object, + usePureComponent: boolean + }>; + + declare function translate>( + namespaces?: | string + | Array + | (($Diff) => string | Array), + options?: TranslateOptions + ): Translator; + + declare type I18nProps = { + i18n?: Object, + ns?: string | Array, + children: (t: TFunction, { i18n: Object, t: TFunction }) => React$Node, + initialI18nStore?: Object, + initialLanguage?: string + }; + declare var I18n: React$ComponentType; + + declare type InterpolateProps = { + className?: string, + dangerouslySetInnerHTMLPartElement?: string, + i18n?: Object, + i18nKey?: string, + options?: Object, + parent?: string, + style?: Object, + t?: TFunction, + useDangerouslySetInnerHTML?: boolean + }; + declare var Interpolate: React$ComponentType; + + declare type TransProps = { + count?: number, + parent?: string, + i18n?: Object, + i18nKey?: string, + t?: TFunction + }; + declare var Trans: React$ComponentType; + + declare type ProviderProps = { i18n: Object, children: React$Element<*> }; + declare var I18nextProvider: React$ComponentType; + + declare type NamespacesProps = { + components: Array>, + i18n: { loadNamespaces: Function } + }; + declare function loadNamespaces(props: NamespacesProps): Promise; + + declare var reactI18nextModule: { + type: "3rdParty", + init: (instance: Object) => void + }; + + declare function setDefaults(options: TranslateOptions): void; + + declare function getDefaults(): TranslateOptions; + + declare function getI18n(): Object; + + declare function setI18n(instance: Object): void; +}