static isTypeError()
Checks whether the value of any type is an instance of `TypeError`
TypeError.isTypeError()
TypeError.isTypeError()public static isTypeError<
Id extends string,
Type extends string | undefined = undefined
>(value: any, id?: Id, type?: Type): value is TypeError<Id, Type> {
return (
super.isError(value, id) &&
(typeof type === 'string' ? (value as any).type === type : true)
);
}Generic type variables
Parameters
Return type
Returns
Example usage
Last updated