diff --git a/source/i18n.ts b/source/i18n.ts index 73b41fe..135e3d1 100644 --- a/source/i18n.ts +++ b/source/i18n.ts @@ -166,7 +166,7 @@ function compileTemplates(root: Readonly>): RepositoryEnt /* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */ -export function match(resourceKey: string, templateData: Readonly): (text: string, ctx: TelegrafContextWithI18n) => string[] | null { +export function match(resourceKey: string, templateData?: Readonly): (text: string, ctx: TelegrafContextWithI18n) => string[] | null { return (text, ctx) => (text && ctx?.i18n && text === ctx.i18n.t(resourceKey, templateData)) ? [text] : null }