diff --git a/framework/core/js/src/@types/translator-icu-rich.d.ts b/framework/core/js/src/@types/translator-icu-rich.d.ts index 08fb52765..a1cefb795 100644 --- a/framework/core/js/src/@types/translator-icu-rich.d.ts +++ b/framework/core/js/src/@types/translator-icu-rich.d.ts @@ -1,4 +1,6 @@ declare module '@askvortsov/rich-icu-message-formatter' { + import Mithril from 'mithril'; + type IValues = Record; type ITypeHandler = ( @@ -10,16 +12,13 @@ declare module '@askvortsov/rich-icu-message-formatter' { ) => string; type IRichHandler = (tag: any, values: IValues, contents: string) => any; - type ValueOrArray = T | ValueOrArray[]; - type NestedStringArray = ValueOrArray; - export class RichMessageFormatter { locale: string | null; constructor(locale: string | null, typeHandlers: Record, richHandler: IRichHandler); format(message: string, values: IValues): string; - process(message: string, values: IValues): NestedStringArray; - rich(message: string, values: IValues): NestedStringArray; + process(message: string, values: IValues): Mithril.Children; + rich(message: string, values: IValues): Mithril.Children; } export function mithrilRichHandler(tag: any, values: IValues, contents: string): any;