Skip to main content

Function: isLocalizedError()

isLocalizedError(error): error is Error & { code: string; messageRef: MessageRef }

Defined in: LocalizedError.ts:62

Structural, not instanceof: an error class in a package that must not depend on this one (a zero-dependency errors package), or an error that crossed a bundle boundary, is recognized by shape — a string code and a messageRef.

Parameters​

ParameterType
errorunknown

Returns​

error is Error & { code: string; messageRef: MessageRef }