@wordpress/i18n
Advanced tools
Comparing version 4.2.2-next.5df0cd52b7.0 to 4.2.2
@@ -32,3 +32,6 @@ /** | ||
} catch (error) { | ||
logErrorOnce('sprintf error: \n\n' + error.toString()); | ||
if (error instanceof Error) { | ||
logErrorOnce('sprintf error: \n\n' + error.toString()); | ||
} | ||
return format; | ||
@@ -35,0 +38,0 @@ } |
@@ -1,5 +0,3 @@ | ||
export function createI18n(initialData?: Record<string, any> | undefined, initialDomain?: string | undefined, hooks?: import("@wordpress/hooks/build-types/createHooks")._Hooks | undefined): I18n; | ||
export type LocaleData = { | ||
[x: string]: any; | ||
}; | ||
export function createI18n(initialData?: LocaleData | undefined, initialDomain?: string | undefined, hooks?: import("@wordpress/hooks/build-types/createHooks")._Hooks | undefined): I18n; | ||
export type LocaleData = Record<string, any>; | ||
/** | ||
@@ -14,3 +12,3 @@ * Returns locale data by domain in a | ||
*/ | ||
export type SetLocaleData = (data?: Record<string, any> | undefined, domain?: string | undefined) => void; | ||
export type SetLocaleData = (data?: LocaleData | undefined, domain?: string | undefined) => void; | ||
/** | ||
@@ -20,3 +18,3 @@ * Resets all current Tannin instance locale data and sets the specified | ||
*/ | ||
export type ResetLocaleData = (data?: Record<string, any> | undefined, domain?: string | undefined) => void; | ||
export type ResetLocaleData = (data?: LocaleData | undefined, domain?: string | undefined) => void; | ||
export type SubscribeCallback = () => void; | ||
@@ -63,3 +61,3 @@ export type UnsubscribeCallback = () => void; | ||
export type HasTranslation = (single: string, context?: string | undefined, domain?: string | undefined) => boolean; | ||
export type Hooks = import("@wordpress/hooks/build-types/createHooks")._Hooks; | ||
export type Hooks = import('@wordpress/hooks').Hooks; | ||
/** | ||
@@ -66,0 +64,0 @@ * An i18n instance |
@@ -117,8 +117,6 @@ export default i18n; | ||
export const hasTranslation: import("./create-i18n").HasTranslation; | ||
export type LocaleData = { | ||
[x: string]: any; | ||
}; | ||
export type SubscribeCallback = () => void; | ||
export type UnsubscribeCallback = () => void; | ||
export type LocaleData = import('./create-i18n').LocaleData; | ||
export type SubscribeCallback = import('./create-i18n').SubscribeCallback; | ||
export type UnsubscribeCallback = import('./create-i18n').UnsubscribeCallback; | ||
declare const i18n: import("./create-i18n").I18n; | ||
//# sourceMappingURL=default-i18n.d.ts.map |
@@ -43,3 +43,6 @@ "use strict"; | ||
} catch (error) { | ||
logErrorOnce('sprintf error: \n\n' + error.toString()); | ||
if (error instanceof Error) { | ||
logErrorOnce('sprintf error: \n\n' + error.toString()); | ||
} | ||
return format; | ||
@@ -46,0 +49,0 @@ } |
{ | ||
"name": "@wordpress/i18n", | ||
"version": "4.2.2-next.5df0cd52b7.0", | ||
"version": "4.2.2", | ||
"description": "WordPress internationalization (i18n) library.", | ||
@@ -33,3 +33,3 @@ "author": "The WordPress Contributors", | ||
"@babel/runtime": "^7.13.10", | ||
"@wordpress/hooks": "^3.2.1-next.5df0cd52b7.0", | ||
"@wordpress/hooks": "^3.2.0", | ||
"gettext-parser": "^1.3.1", | ||
@@ -44,3 +44,3 @@ "lodash": "^4.17.21", | ||
}, | ||
"gitHead": "558d577d12bec15f05e694eb49a094836d885cca" | ||
"gitHead": "98c42a7187f788fe3e023f04df7f5dcbdae4e4e7" | ||
} |
@@ -31,6 +31,7 @@ /** | ||
} catch ( error ) { | ||
logErrorOnce( 'sprintf error: \n\n' + error.toString() ); | ||
if ( error instanceof Error ) { | ||
logErrorOnce( 'sprintf error: \n\n' + error.toString() ); | ||
} | ||
return format; | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2678
0
210565
Updated@wordpress/hooks@^3.2.0