Every property in a base model class gets these definitions:
private _firstName?: string;
get firstName(): string {
if (this._firstName === undefined) throw new Error('Property firstName is not selected');
return this._firstName;
}
set firstName(value: string) {
this._firstName = value;
}
I wonder if there's a better way do handle this that would be less verbose. Models with a ton of properties would seem pretty messy, but luckily developers won't be touching the base model.
Every property in a base model class gets these definitions:
I wonder if there's a better way do handle this that would be less verbose. Models with a ton of properties would seem pretty messy, but luckily developers won't be touching the base model.