The get accessor gets the error identification
Last updated 1 year ago
Was this helpful?
CommonError.prototype.id
The accessor gets the error by returning the property of a specified object.
public get id(): Id | undefined { return this.#id; }
|
The return type is the generic type variable or .
The return value is the error of the generic type variable or .
// Example usage. import { CommonError } from '@angular-package/error'; // Extend the `CommonError` class. class TestError<Id extends string> extends CommonError<Id> {} // Returns "(AE:427)". new TestError('problem', 'Fix accessor.', '(AE:427)').id;
get
#id
undefined
Id