diff --git a/src/i18n/en.ts b/src/i18n/en.ts index ea1f9ec..c06d7cc 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -1,5 +1,5 @@ -import { createLocale } from './' +import { createLocale } from './utils' export default createLocale({ 'PROCESSING' () { diff --git a/src/i18n/es.ts b/src/i18n/es.ts index fde6e46..744d97c 100644 --- a/src/i18n/es.ts +++ b/src/i18n/es.ts @@ -1,5 +1,5 @@ -import { createLocale } from './' +import { createLocale } from './utils' export default createLocale({ 'PROCESSING' () { diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 278b49d..ec7048f 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -17,13 +17,6 @@ export interface LOCALE { 'FULL_SCORE' (): string; } -/** - * type checking only so no missing keys - */ -export function createLocale (obj: OBJ): OBJ { - return Object.freeze(obj) -} - const locales = ( (l: L) => Object.freeze(l))({ en, es, diff --git a/src/i18n/utils.ts b/src/i18n/utils.ts new file mode 100644 index 0000000..14f73c4 --- /dev/null +++ b/src/i18n/utils.ts @@ -0,0 +1,9 @@ + +import type { LOCALE } from './' + +/** + * type checking only so no missing keys + */ +export function createLocale (obj: OBJ): OBJ { + return Object.freeze(obj) +}