Skip to content

Катюшкина Настя#10

Open
NastyaKatyushkina wants to merge 3 commits into
RTF-Angular-2021:masterfrom
NastyaKatyushkina:katyushkina
Open

Катюшкина Настя#10
NastyaKatyushkina wants to merge 3 commits into
RTF-Angular-2021:masterfrom
NastyaKatyushkina:katyushkina

Conversation

@NastyaKatyushkina

Copy link
Copy Markdown

No description provided.

Comment thread src/task_1/index.ts Outdated
export class MoneyRepository {
private _repository: any;
constructor(initialRepository: any) {
private _repository: Array<object>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Object в типизации - страшный грех, также как и any

Comment thread src/task_1/index.ts Outdated

this._repository.forEach(i =>
{
for (let key in i)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Для обхода массива следует использовать методы массива

Comment thread src/task_1/index.ts Outdated
{
for (let key in i)
{
if (i['moneyInfo']['currency']===currency && copy >= i['count'] && (rub.includes(i['count']) || doll.includes(i['count'])))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Обращаться к объекту через скобки и строчную нотацию следует только в одном случае - когда название поля состоит из нескольких слова, но это полная жесть и так никто не делает

Comment thread src/task_1/index.ts Outdated
return copy === 0;
}

public money (a: IMoneyUnit, b: IMoneyUnit): number

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

что с названием метода?

Comment thread src/task_2/index.ts

public authorize(userId: any, cardId: any, cardPin: any): any {

public authorize(userId: string, cardId: string, cardPin: string): boolean

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Этот метод всегда возвращает false

Comment thread src/task_3/index.ts
{
return this.registerForUserNewCard(argsForChangeFunction);
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

За эту задачу 3 балла

Comment thread src/task_4/index.ts Outdated
{
moneyInfo:
{
denomination: (+moneyUnit.moneyInfo.denomination * c).toString(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Неявное преобразование - зло

Comment thread src/task_5/index.ts Outdated

for (const moneyUnit of moneyUnits)
{
const factor = this._currentCard.currency === moneyUnit.moneyInfo.currency ? 1 : (this._currentCard.currency === Currency.RUB ? 70 : (1 / 70))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Опять мясо, нужно разбивать такое на более простую логику

@Toouren

Toouren commented Apr 14, 2021

Copy link
Copy Markdown
Contributor

Пока 3 балла только за одну задачу, за все остальные 0
Основные ошибки:

  1. Object в типах
  2. Неявные преобразования
  3. Местами слишком сложная логика, которую надо деструктуризировать
  4. Для обхода массива надо использовать методы объекта массива
  5. Получение поля объекта через квадратные скобки

Comment thread src/task_2/index.ts
}
}
} No newline at end of file
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 балла

Comment thread src/task_1/index.ts
}
}
}
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 балла

Comment thread src/task_5/index.ts
return false;
}
} No newline at end of file
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 балла

Comment thread src/task_4/index.ts
return res;

}
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 балла

@m-abrosimov

m-abrosimov commented May 26, 2021

Copy link
Copy Markdown

+8 баллов

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.

3 participants