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