-
Notifications
You must be signed in to change notification settings - Fork 37
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
Mykhailo Hutsalenko Homework #1 #61
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,3 @@ | |||
export interface ISalary { |
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.
best practice and by conventions - filename should be salary.interface.ts
the same for another file
className: 'open menu' | ||
} | ||
|
||
var expectedClassName: string = 'open menu new me'; |
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.
use let or const
} | ||
|
||
export function getToptPaidEmployee(salaries: ISalary): string { | ||
let topPaidEmployee = Object.keys(salaries).reduce((function(prevEmp, nextEmp){ |
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.
have you set up tslint plugin to your editor?
because I have tslint warnings, pls fix
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.
Yes, of course. I just did not have time to refactor it all in a best practice way
return topPaidEmployee; | ||
} | ||
|
||
export function multiplyNumeric(object : any) { |
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.
no any and type for function return value
fix everywhere
addClass(obj, 'new'); // obj.className='open menu new' | ||
addClass(obj, 'open'); // без изменений (класс уже существует) | ||
addClass(obj, 'me'); // obj.className='open menu new me' | ||
console.log(obj.className); |
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.
no console by tslint rules
No description provided.