From 5879d7e9435d480744406235fb21f4e3a7af7f00 Mon Sep 17 00:00:00 2001 From: RoachxD Date: Tue, 15 Aug 2023 13:16:55 +0300 Subject: [PATCH] feat: add `index.ts` to `components` and update main `index.ts` - Created `index.ts` file for `components`. - Updated main `index.ts` in order to reflect the addition. - Added `I18nOptions` type export. --- src/components/index.ts | 4 ++++ src/index.ts | 11 +++-------- 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 src/components/index.ts diff --git a/src/components/index.ts b/src/components/index.ts new file mode 100644 index 0000000..7a34eec --- /dev/null +++ b/src/components/index.ts @@ -0,0 +1,4 @@ +export * from './DateTime'; +export * from './I18nProvider'; +export * from './Numeric'; +export * from './Text'; \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index af3adb7..c891d1c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,19 +4,14 @@ import { createI18n as create } from 'i18n-mini'; import type { I18nOptions } from 'i18n-mini'; import type { I18n } from './types'; +export type { I18n, I18nOptions }; + export { defineMessages } from 'i18n-mini'; export type { I18nPresets } from 'i18n-mini'; -export { I18nProvider } from './components/I18nProvider'; -export { Text } from './components/Text'; -export { Numeric } from './components/Numeric'; -export { DateTime } from './components/DateTime'; +export * from './components'; export { useI18n } from './context'; -export type { TextProps } from './components/Text'; -export type { NumericProps } from './components/Numeric'; -export type { DateTimeProps } from './components/DateTime'; -export type { I18n } from './types'; function formatTag(tag: string, child: string | string[] | undefined) { const el = template(`<${tag}>`);