localizeDiagnostic
此内容尚不支持你的语言。
localizeDiagnostic<
T>(diagnostic,catalog,locale):T
Defined in: packages/core/src/diagnostic-localization.ts:21
Return a copy of diagnostic whose message is the localized template for
locale, or the original diagnostic unchanged when the catalog has no
template for its code. The stable code, structured fields and
recoverable flag are never altered, so callers can keep branching on the
code while rendering a localized message.
Type Parameters
Section titled “Type Parameters”T extends Diagnostic
Parameters
Section titled “Parameters”diagnostic
Section titled “diagnostic”T
catalog
Section titled “catalog”locale
Section titled “locale”string
Returns
Section titled “Returns”T