mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
Type react-redux-i18n: return valide callback function
This commit is contained in:
8
react-redux-i18n/index.d.ts
vendored
8
react-redux-i18n/index.d.ts
vendored
@@ -20,6 +20,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;
|
||||
@@ -55,8 +59,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