githubEdit

get [Symbol.toStringTag]()

Changes the default tag to 'RangeError' for an instance

[Symbol.toStringTag]()

The getarrow-up-right accessor, with the help of toStringTagarrow-up-right, changes the default tag to 'RangeError' for an instance of RangeError.

It can be read by the typeOf()arrow-up-right function of @angular-package/typearrow-up-right.

range-error.class.ts
public get [Symbol.toStringTag](): string {
  return 'RangeError';
}

Return type

Returns

The return value is the word 'RangeError' of a stringarrow-up-right.

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