get name()
The `get` accessor obtains error name
TypeError.prototype.name
TypeError.prototype.nameThe get accessor obtains error name of a string type, set to 'TypeError' that is being thrown.
public get name(): string {
return 'TypeError';
}Return type
Returns
The return value is the error instance name of string type.
Example usage
// Example usage.
import { TypeError } from '@angular-package/error';
// Returns "TypeError".
new TypeError('problem', 'Fix accessor.').name;Last updated
Was this helpful?