get type()
The `get` accessor obtains the type
TypeError.prototype.type
TypeError.prototype.type
The 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;
}
Return type
Returns
The return value is the type of generic type variable Type
or undefined
.
Example usage
// Example usage.
import { TypeError } from '@angular-package/error';
// Returns "string".
new TypeError('problem', 'Fix accessor.', '(TE:201)', 'string').type;
Last updated
Was this helpful?