mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-10 12:10:18 +00:00
Merge pull request #1023 from vvakame/i18next-fix-compile-error
I18next fix compile error
This commit is contained in:
92
i18next/i18next.d.ts
vendored
92
i18next/i18next.d.ts
vendored
@@ -17,49 +17,49 @@ interface IResourceStoreKey {
|
||||
}
|
||||
|
||||
interface I18nextOptions {
|
||||
lng?: string; // Default value: undefined
|
||||
load?: string; // Default value: 'all'
|
||||
preload?: string[]; // Default value: []
|
||||
lowerCaseLng?: boolean; // Default value: false
|
||||
returnObjectTrees?: boolean; // Default value: false
|
||||
fallbackLng?: string; // Default value: 'dev'
|
||||
detectLngQS?: string; // Default value: 'setLng'
|
||||
ns?: any; // Default value: 'translation' (string), can also be an object
|
||||
nsseparator?: string; // Default value: '::'
|
||||
keyseparator?: string; // Default value: '.'
|
||||
selectorAttr?: string; // Default value: 'data-i18n'
|
||||
debug?: boolean; // Default value: false
|
||||
|
||||
resGetPath?: string; // Default value: 'locales/__lng__/__ns__.json'
|
||||
resPostPath?: string; // Default value: 'locales/add/__lng__/__ns__'
|
||||
|
||||
getAsync?: boolean; // Default value: true
|
||||
postAsync?: boolean; // Default value: true
|
||||
|
||||
resStore?: IResourceStore; // Default value: undefined
|
||||
useLocalStorage?: boolean; // Default value: false
|
||||
localStorageExpirationTime?: number; // Default value: 7 * 24 * 60 * 60 * 1000 (in ms default one week)
|
||||
|
||||
dynamicLoad?: boolean; // Default value: false
|
||||
sendMissing?: boolean; // Default value: false
|
||||
sendMissingTo?: string; // Default value: 'fallback'. Other options are: current | all
|
||||
sendType?: string; // Default value: 'POST'
|
||||
|
||||
interpolationPrefix?: string; // Default value: '__'
|
||||
interpolationSuffix?: string; // Default value: '__'
|
||||
reusePrefix?: string; // Default value: '$t('
|
||||
reuseSuffix?: string; // Default value: ')'
|
||||
pluralSuffix?: string; // Default value: '_plural'
|
||||
pluralNotFound?: string; // Default value: ['plural_not_found' Math.random()].join( '' )
|
||||
contextNotFound?: string; // Default value: ['context_not_found' Math.random()].join( '' )
|
||||
|
||||
setJqueryExt?: boolean; // Default value: true
|
||||
defaultValueFromContent?: boolean; // Default value: true
|
||||
useDataAttrOptions?: boolean; // Default value: false
|
||||
cookieExpirationTime?: number; // Default value: undefined
|
||||
useCookie?: boolean; // Default value: true
|
||||
cookieName?: string; // Default value: 'i18next'
|
||||
|
||||
lng?: string; // Default value: undefined
|
||||
load?: string; // Default value: 'all'
|
||||
preload?: string[]; // Default value: []
|
||||
lowerCaseLng?: boolean; // Default value: false
|
||||
returnObjectTrees?: boolean; // Default value: false
|
||||
fallbackLng?: string; // Default value: 'dev'
|
||||
detectLngQS?: string; // Default value: 'setLng'
|
||||
ns?: any; // Default value: 'translation' (string), can also be an object
|
||||
nsseparator?: string; // Default value: '::'
|
||||
keyseparator?: string; // Default value: '.'
|
||||
selectorAttr?: string; // Default value: 'data-i18n'
|
||||
debug?: boolean; // Default value: false
|
||||
|
||||
resGetPath?: string; // Default value: 'locales/__lng__/__ns__.json'
|
||||
resPostPath?: string; // Default value: 'locales/add/__lng__/__ns__'
|
||||
|
||||
getAsync?: boolean; // Default value: true
|
||||
postAsync?: boolean; // Default value: true
|
||||
|
||||
resStore?: IResourceStore; // Default value: undefined
|
||||
useLocalStorage?: boolean; // Default value: false
|
||||
localStorageExpirationTime?: number; // Default value: 7 * 24 * 60 * 60 * 1000 (in ms default one week)
|
||||
|
||||
dynamicLoad?: boolean; // Default value: false
|
||||
sendMissing?: boolean; // Default value: false
|
||||
sendMissingTo?: string; // Default value: 'fallback'. Other options are: current | all
|
||||
sendType?: string; // Default value: 'POST'
|
||||
|
||||
interpolationPrefix?: string; // Default value: '__'
|
||||
interpolationSuffix?: string; // Default value: '__'
|
||||
reusePrefix?: string; // Default value: '$t('
|
||||
reuseSuffix?: string; // Default value: ')'
|
||||
pluralSuffix?: string; // Default value: '_plural'
|
||||
pluralNotFound?: string; // Default value: ['plural_not_found' Math.random()].join( '' )
|
||||
contextNotFound?: string; // Default value: ['context_not_found' Math.random()].join( '' )
|
||||
|
||||
setJqueryExt?: boolean; // Default value: true
|
||||
defaultValueFromContent?: boolean; // Default value: true
|
||||
useDataAttrOptions?: boolean; // Default value: false
|
||||
cookieExpirationTime?: number; // Default value: undefined
|
||||
useCookie?: boolean; // Default value: true
|
||||
cookieName?: string; // Default value: 'i18next'
|
||||
|
||||
postProcess?: string; // Default value: undefined
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ interface I18nextStatic {
|
||||
toLanguages(language: string): string[];
|
||||
regexEscape(str: string): string;
|
||||
};
|
||||
init(callback?: (t: (key: string, options?: any) => string) => void ): JQueryDeferred;
|
||||
init(options?: I18nextOptions, callback?: (t: (key: string, options?: any) => string) => void ): JQueryDeferred;
|
||||
init(callback?: (t: (key: string, options?: any) => string) => void ): JQueryDeferred<any>;
|
||||
init(options?: I18nextOptions, callback?: (t: (key: string, options?: any) => string) => void ): JQueryDeferred<any>;
|
||||
lng(): string;
|
||||
loadNamespace(namespace: string, callback?: () => void ): void;
|
||||
loadNamespaces(namespaces: string[], callback?: () => void ): void;
|
||||
@@ -124,4 +124,4 @@ interface JQuery {
|
||||
i18n: (options?: I18nextOptions) => void;
|
||||
}
|
||||
|
||||
declare var i18next: I18nextStatic;
|
||||
declare var i18next: I18nextStatic;
|
||||
|
||||
Reference in New Issue
Block a user