parent
5d50c2337c
commit
688e0a4c7e
|
@ -1,5 +1,5 @@
|
|||
|
||||
import { createLocale } from './'
|
||||
import { createLocale } from './utils'
|
||||
|
||||
export default createLocale({
|
||||
'PROCESSING' () {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
import { createLocale } from './'
|
||||
import { createLocale } from './utils'
|
||||
|
||||
export default createLocale({
|
||||
'PROCESSING' () {
|
||||
|
|
|
@ -17,13 +17,6 @@ export interface LOCALE {
|
|||
'FULL_SCORE' (): string;
|
||||
}
|
||||
|
||||
/**
|
||||
* type checking only so no missing keys
|
||||
*/
|
||||
export function createLocale<OBJ extends LOCALE> (obj: OBJ): OBJ {
|
||||
return Object.freeze(obj)
|
||||
}
|
||||
|
||||
const locales = (<L extends { [n: string]: LOCALE } /** type checking */> (l: L) => Object.freeze(l))({
|
||||
en,
|
||||
es,
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
import type { LOCALE } from './'
|
||||
|
||||
/**
|
||||
* type checking only so no missing keys
|
||||
*/
|
||||
export function createLocale<OBJ extends LOCALE> (obj: OBJ): OBJ {
|
||||
return Object.freeze(obj)
|
||||
}
|
Loading…
Reference in New Issue