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