@cloudflare/intl-core
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -6,2 +6,10 @@ # Change Log | ||
<a name="1.0.10"></a> | ||
## [1.0.10](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/intl-core@1.0.9...@cloudflare/intl-core@1.0.10) (2018-10-11) | ||
**Note:** Version bump only for package @cloudflare/intl-core | ||
<a name="1.0.9"></a> | ||
@@ -8,0 +16,0 @@ ## [1.0.9](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/intl-core@1.0.8...@cloudflare/intl-core@1.0.9) (2018-10-09) |
{ | ||
"name": "@cloudflare/intl-core", | ||
"description": "", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"types": "./src", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
@@ -6,3 +6,4 @@ import Translator from './Translator'; | ||
TLoadPhrases as tempTLoadPhrases, | ||
IPhrases as tempIPhrases | ||
IPhrases as tempIPhrases, | ||
TPhrasesModule as tempTPhrasesModule | ||
} from './types'; | ||
@@ -12,3 +13,4 @@ | ||
export type IPhrases = tempIPhrases; | ||
export type TPhrasesModule = tempTPhrasesModule; | ||
export { ESupportedLocales, Translator, makeLoadPhrases }; |
@@ -1,9 +0,7 @@ | ||
import { TLoadPhrases, ESupportedLocales, IPhrases } from '../src'; | ||
import { TLoadPhrases, ESupportedLocales, TPhrasesModule } from '../src'; | ||
type TModule = IPhrases & { | ||
default: IPhrases; | ||
type TLoadLocales = { | ||
[locale in ESupportedLocales]: () => Promise<TPhrasesModule> | ||
}; | ||
type TLoadLocales = { [locale in ESupportedLocales]: () => Promise<TModule> }; | ||
type TMakeLoadPhrases = (locales: TLoadLocales) => TLoadPhrases; | ||
@@ -13,3 +11,3 @@ | ||
const loadPhrases: TLoadPhrases = async (locale: ESupportedLocales) => { | ||
let module: TModule; | ||
let module: TPhrasesModule; | ||
module = await locales[locale](); | ||
@@ -16,0 +14,0 @@ |
@@ -5,4 +5,7 @@ export type TLoadPhrases = (language: ESupportedLocales) => Promise<IPhrases>; | ||
} | ||
export type IPhrases = { | ||
export interface IPhrases { | ||
[key: string]: string; | ||
} | ||
export type TPhrasesModule = IPhrases & { | ||
default: IPhrases; | ||
}; |
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
23467
561