/** * Substitute `{{name}}` and `{name}` placeholders in one left-to-right pass. * * WHY BOTH SPELLINGS * `{{name}}` is the house style, but a large amount of already-SEEDED copy uses * the single brace: 174 rows in the FluidGrids production dictionary alone (25 * of them `dashboard.*`) against 512 rows using `{{name}}`. Those strings were * authored in MFEs whose local fallback helper interpolates single braces, so * they looked correct until the key reached the dictionary and `t()` began * returning the stored value instead of the local fallback — at which point the * FluidGrids dashboard rendered `{memberLabel} across {count} {workspaceLabel}` * verbatim to users (BOFF-7245). Accepting both spellings fixes every such row * in every product with no re-seed. * * WHY ONE REGEX PASS AND NOT CHAINED `replaceAll` * Chained replacement re-scans text it has already written. A parameter whose * VALUE happens to contain braces — a workspace literally named "{count}", a * translated string carrying a placeholder — would be substituted a second time * on a later iteration. Matching once and looking each name up leaves inserted * values untouched, and it is also why a repeated placeholder works: every * occurrence is matched by the same pass, which the old `replace` (first match * only) got wrong for "…{{observed}}{{unit}} · threshold {{threshold}}{{unit}}". * * An unknown name is left exactly as written rather than blanked, so a missing * parameter shows up as `{name}` in review instead of silently vanishing, and * braces that are not placeholders at all — `{}` in a code sample, `{0}` in an * index template — survive untouched. */ export declare function interpolate(template: string, params: Record): string; //# sourceMappingURL=interpolate.d.ts.map