mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 08:26:35 +08:00
Type react-redux-i18n: return valide callback function
This commit is contained in:
8
react-redux-i18n/react-redux-i18n.d.ts
vendored
8
react-redux-i18n/react-redux-i18n.d.ts
vendored
@@ -23,6 +23,10 @@ declare module 'react-redux-i18n' {
|
||||
|
||||
type TranslationObjects = { [lang: string]: SubTranslationObject };
|
||||
|
||||
type DispatchCallback<S> = {
|
||||
(dispatch?: _Redux.Dispatch<S>, getState?: () => S): any;
|
||||
}
|
||||
|
||||
type I18nState = {
|
||||
translations: TranslationObjects;
|
||||
locale: string;
|
||||
@@ -58,8 +62,8 @@ declare module 'react-redux-i18n' {
|
||||
/**
|
||||
* Redux Actions
|
||||
*/
|
||||
export function loadTranslations(translationsObject: TranslationObjects): void;
|
||||
export function loadTranslations(translationsObject: TranslationObjects): DispatchCallback<any>;
|
||||
|
||||
export function setLocale(locale: string): void;
|
||||
export function setLocale(locale: string): DispatchCallback<any>;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user