@jsvision/i18n / isI18nError
Function: isI18nError()
isI18nError(
value):value is I18nError
Defined in: errors.ts:63
Narrows an unknown caught value to I18nError.
Parameters
value
unknown
Caught value to inspect.
Returns
value is I18nError
true only for errors created by this package.
Example
ts
import { isI18nError } from '@jsvision/i18n';
declare const error: unknown;
if (isI18nError(error)) console.error(error.code);