Skip to content

Conversation

Mary2811
Copy link

@Mary2811 Mary2811 commented Oct 3, 2023

No description provided.

@@ -0,0 +1,47 @@
class Person {
Copy link
Contributor

Choose a reason for hiding this comment

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

не в том каталоге размещен код - размещайте внутри саги, ну и не js а ts

Comment on lines 3 to 5
if (typeof name !== 'string' || typeof gender !== 'string' || typeof age !== 'number') {
throw new Error('Invalid argument type');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

в ts не пришлось бы такое писать + тесты на этот случай надо

}

static createMan(name, age) {
return new Person(name, age, 'man');
Copy link
Contributor

Choose a reason for hiding this comment

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

'man' 'wooman' в enum (но он только в ts вроде бы

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