diff --git a/src/runtime/types/index.ts b/src/runtime/types/index.ts index ebca6ee..1cef4c6 100644 --- a/src/runtime/types/index.ts +++ b/src/runtime/types/index.ts @@ -1,4 +1,4 @@ -import { Formats } from 'intl-messageformat'; +import type { FormatXMLElementFn, Formats } from 'intl-messageformat'; export interface LocaleDictionary { [key: string]: LocaleDictionary | string | Array; @@ -8,12 +8,25 @@ export type LocalesDictionary = { [key: string]: LocaleDictionary; }; +export type InterpolationValues = + | Record< + string, + | string + | number + | boolean + | Date + | FormatXMLElementFn + | null + | undefined + > + | undefined; + export interface MessageObject { id?: string; locale?: string; format?: string; default?: string; - values?: Record; + values?: InterpolationValues; } export type MessageFormatter = (