@jsvision/ui / isI18nError
Function: isI18nError()
isI18nError(
value):value is I18nError
Defined in: i18n/dist/errors.d.ts:53
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);