Changes the default tag to 'TypeError' for an instance
Last updated 1 year ago
Was this helpful?
[Symbol.toStringTag]()
The accessor, with the help of , changes the default tag to 'ValidationError' for an instance of .
'ValidationError'
It can be read by the function of .
public get [Symbol.toStringTag](): string { return 'TypeError'; }
The return value is the word 'ValidationError' of a .
// Example usage. import { ValidationError } from '@angular-package/error'; import { typeOf } from '@angular-package/type'; // Returns "validationerror". typeOf(new ValidationError('problem', 'Fix accessor.'));
get
toStringTag
ValidationError
typeOf()
@angular-package/type
string