Skip to content

Михалев Кирилл#16

Open
Foxovsky-bit wants to merge 1 commit intoRTF-Angular-2021:masterfrom
Foxovsky-bit:change
Open

Михалев Кирилл#16
Foxovsky-bit wants to merge 1 commit intoRTF-Angular-2021:masterfrom
Foxovsky-bit:change

Conversation

@Foxovsky-bit
Copy link

No description provided.

type BarType = unknown;
type FooType = {stringProp:string,numberProp:number,barObject:BarType};
type BarType = {stringsArrayProp:Array<string>,numbersOrDatesArrayProp:Array<Date|number>,functionProp:Function};

Copy link

Choose a reason for hiding this comment

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

Зачтено на 3 балла

return x + y;
throw new Error;
}

Copy link

Choose a reason for hiding this comment

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

Зачтено на 3 балла

type не может иметь несколько объявлений.
3)type - создает новое имя для типа, inteface - обеспечивает способ определения сущностей.
4)type не может быть реализован,только объявлен,а члены interface реализуются производным классом.
*/
Copy link

Choose a reason for hiding this comment

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

Зачтено на 3 балла

export function filterUsers(persons: Person[], criteria: {type?: string, name?: string, age?: number, occupation?: string}): User[] {
return persons.filter(isUser).filter((user) => {
const criteriaKeys = Object.keys(criteria);
return criteriaKeys.every((fieldName) => {
Copy link

Choose a reason for hiding this comment

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

Зачтено на 3 балла

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