doc: add for sub in SubstitutionValue

This commit is contained in:
Florian Duros 2026-03-27 09:29:13 +01:00
parent 520dfffc95
commit 91d153aca3

View File

@ -20,6 +20,11 @@ export type Translations = Record<
/**
* The value a variable or tag can take for a translation interpolation.
*
* When used as a function, `sub` is the text content wrapped between the tag
* in the translation string. For example, given `"Click <a>here</a>"`, the
* function receives `"here"` and should return a `ReactNode` wrapping it.
*
* @public
*/
export type SubstitutionValue = number | string | ReactNode | ((sub: string) => ReactNode);