-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
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
codewars and moodle #12
base: Ivanova_Marija_Alekseevna
Are you sure you want to change the base?
Conversation
Classes/person.js
Outdated
@@ -0,0 +1,47 @@ | |||
class Person { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не в том каталоге размещен код - размещайте внутри саги, ну и не js а ts
Classes/person.js
Outdated
if (typeof name !== 'string' || typeof gender !== 'string' || typeof age !== 'number') { | ||
throw new Error('Invalid argument type'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в ts не пришлось бы такое писать + тесты на этот случай надо
Classes/person.js
Outdated
} | ||
|
||
static createMan(name, age) { | ||
return new Person(name, age, 'man'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'man' 'wooman' в enum (но он только в ts вроде бы
No description provided.