Web: Login: fixed types

This commit is contained in:
Artem Tarasov 2022-08-26 16:38:32 +03:00
parent f982793225
commit ba23703c53
3 changed files with 4 additions and 2 deletions

View File

@ -108,4 +108,6 @@ declare global {
type HTMLElementEvent<T extends HTMLElement> = Event & { type HTMLElementEvent<T extends HTMLElement> = Event & {
target: T; target: T;
}; };
type TFuncType = (key: string) => string;
} }

View File

@ -21,7 +21,7 @@ interface IParsedConfig extends Object {
} }
interface ILoginRequest extends Request { interface ILoginRequest extends Request {
i18n?: I18next | I18nextProviderProps; i18n?: I18next | I18nextProviderProps;
t?: (str: string) => string; t?: TFuncType;
} }
type timeoutType = ReturnType<typeof setTimeout>; type timeoutType = ReturnType<typeof setTimeout>;
interface IAcceptLanguage extends Object { interface IAcceptLanguage extends Object {

View File

@ -11,7 +11,7 @@ type Template = (
initialI18nStoreASC: object, initialI18nStoreASC: object,
initialLanguage: string, initialLanguage: string,
assets: assetsType, assets: assetsType,
t?: (str: string) => string t?: TFuncType
) => string; ) => string;
const template: Template = ( const template: Template = (