The `get` accessor obtains the type
Last updated 1 year ago
Was this helpful?
TypeError.prototype.type
The accessor obtains the type of generic type variable that causes an error to be thrown(or not thrown) if set, otherwise returns .
public get type(): Type | undefined { return this.#type; }
|
The return value is the type of generic type variable or .
// Example usage. import { TypeError } from '@angular-package/error'; // Returns "string". new TypeError('problem', 'Fix accessor.', '(TE:201)', 'string').type;
get
undefined
Type