Skip to content

1681-engine / index / formatMessage

Function: formatMessage() ​

ts
function formatMessage(text, args): string;

Defined in: src/i18n/formatMessage.ts:14

Fills {0}, {1}… with args. A placeholder with no argument is left as written, so a missing argument shows where it is instead of printing "undefined". {{ and }} print a literal brace.

Parameters ​

ParameterType
textstring
argsreadonly unknown[]

Returns ​

string

Released under the MIT License.