F

format

Formats a localized string, interpolating ICU MessageFormat placeholders.

function format(key: string, vars?: FormatVars): string

Parameters

NameTypeDescription
keystring

The message key to resolve and format.

vars?FormatVars

The variables to interpolate into the message.

Returns

string

The formatted string.