Skip to content

Conversation

holenyt
Copy link

@holenyt holenyt commented Dec 7, 2024

No description provided.

Comment on lines +7 to +9
this._name = name;
this.age = age;
this._sick = isSick;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this._name = name;
this.age = age;
this._sick = isSick;
this.name = name;
this.age = age;
this.sick = isSick;

таким образом мы переиспользуем сеттеры - и не будет возможно установить параметры в обход сеттеров и их проверок

@@ -0,0 +1,17 @@
import { Customer } from "../src/Customer";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

странно, vscode ругается, но линтер проходит, но тут уже ко мне вопросик :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants