static isError()
Checks whether the value of any type is a this instance of any or the given identification
CommonError.isError()
CommonError.isError()protected static isError<Id extends string>(
value: any,
id?: Id
): value is CommonError<Id> {
return typeof value === 'object' && value instanceof this
? typeof id === 'string'
? value.id === id
: true
: false;
}Generic type variables
Parameters
value:any
value:anyReturn type
Returns
Example usage
Last updated