We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
These are the getters setup today:
automation-app/src/service/operation/operation.ts
Lines 16 to 27 in 9b4854b
A better way:
export class Operation { private _name: string; private _events: string[]; private _tasks: Task[]; constructor(name: string, events: string[], tasks: Task[]) { this._name = name; this._events = events; this._tasks = tasks; } public get name(): string { return this._name; } public get events(): string[] { return this._events; } public get tasks(): Task[] { return this._tasks; } }
Even better we can just use readonly:
export class Operation { readonly name: string; readonly events: string[]; readonly tasks: Task[]; constructor(name: string, events: string[], tasks: Task[]) { this.name = name; this.events = events; this.tasks = tasks; } }
Thanks.
The text was updated successfully, but these errors were encountered:
peterzhuamazon
Successfully merging a pull request may close this issue.
These are the getters setup today:
automation-app/src/service/operation/operation.ts
Lines 16 to 27 in 9b4854b
A better way:
Even better we can just use readonly:
Thanks.
The text was updated successfully, but these errors were encountered: