Skip to content

Dmitry plus lesson 10 typescript homework#166

Open
dmitryplus wants to merge 8 commits intonickovchinnikov:masterfrom
dmitryplus:dmitry_plus-lesson-10-typescript-homework
Open

Dmitry plus lesson 10 typescript homework#166
dmitryplus wants to merge 8 commits intonickovchinnikov:masterfrom
dmitryplus:dmitry_plus-lesson-10-typescript-homework

Conversation

@dmitryplus
Copy link

No description provided.

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FIXME = any;

type FilteredStates = "initial" | "inWork" | "fullfilled";

Choose a reason for hiding this comment

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

так не пойдёт, у нас дублирование произошло, а нужно вычислить тип на основе существующего. Посмотрите в сторону Exclude

Copy link
Author

Choose a reason for hiding this comment

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

поправил


// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FIXME = any;
type FIXME =

Choose a reason for hiding this comment

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

тип нужно вычислять на основе существующего

Copy link
Author

Choose a reason for hiding this comment

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

поправил


// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FIXME = any;
type FIXME = Record<any, any>;

Choose a reason for hiding this comment

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

не катит ))

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FIXME = any;
type GoodNames = "initial" | "inWork";
type FIXME = { state: GoodNames; sum: number; workerId?: number } | null;

Choose a reason for hiding this comment

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

тип нужно вычислять на основе существующего

Copy link
Author

Choose a reason for hiding this comment

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

поправил


// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FIXME = any;
type FIXME = React.ComponentType<Props>;

Choose a reason for hiding this comment

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

что такое Props?

Copy link
Author

Choose a reason for hiding this comment

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

поменял на infer


// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FIXME = any;
type FIXME = Array<FilteredStates>;

Choose a reason for hiding this comment

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

exclude

Copy link
Author

Choose a reason for hiding this comment

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

перевел на exclude

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

Comments