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