Skip to content

Melanin Nikita#28

Open
NikitaMelanin wants to merge 5 commits into
RTF-TypeScript-2021:devfrom
NikitaMelanin:dev
Open

Melanin Nikita#28
NikitaMelanin wants to merge 5 commits into
RTF-TypeScript-2021:devfrom
NikitaMelanin:dev

Conversation

@NikitaMelanin
Copy link
Copy Markdown

No description provided.

@sadyan42 sadyan42 assigned loozmax and unassigned sadyan42 Oct 5, 2021
Comment thread topic-3/task-3/index.js
return date >= this.vacationStartDate && date <= this.vacationEndDate;

}
};
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 topic-3/task-4/index.js
*/

function Organaizer(meetings = [], vacations = []) {
this.meetings = meetings;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Проверка на входные данные?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

У нас же указано, что поступает: "массив данных", зачем делать проверку?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Затем, что мне ничего не запрещает прокинуть туда что-то иное.

Comment thread topic-3/task-1/index.js Outdated
*/
function Time(hours, minutes) {
}
if (hours < 0 || hours > 24 || minutes < 0 || minutes > 60) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

А если строка

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

А так разве изначально не понятно, что будет введено число?

Comment thread topic-3/task-2/index.js Outdated
*/
function Meeting(meetingDate, startTime, endTime) {
}
if (startTime.hours < 8 || endTime.hours > 19 || startTime > endTime){
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

А если строка

Comment thread topic-3/task-2/index.js
this.endTime = endTime;
};
Meeting.prototype.isMeetingInTimeRange = function(start, end) {
return start.isEarlier(this.endTime) && end.isLater(this.startTime);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Не все возможные случаи

@loozmax
Copy link
Copy Markdown

loozmax commented Oct 5, 2021

В принципе ок, поправь замечания

Comment thread topic-3/task-2/index.js Outdated
*/
function Meeting(meetingDate, startTime, endTime) {
}
const {Time} = require("../task-1");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

все импорты в начале файла

Comment thread topic-3/task-4/index.js Outdated
*/

function Organaizer(meetings = [], vacations = []) {
if(!Array.isArray(meetings) && !Array.isArray(vacations)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Необходимо сделать проверку, что массив meetings принадлежит инстансу класса Meeting, а vacations инстанс Vacation

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