Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mishagtsk
Copy link

No description provided.

@@ -0,0 +1,3 @@
export interface ISalary {
Copy link
Owner

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';
Copy link
Owner

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){
Copy link
Owner

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

Copy link
Author

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) {
Copy link
Owner

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);
Copy link
Owner

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

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