跳转到内容

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.

T extends Diagnostic

T

DiagnosticCatalog

string

T