Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lessons/module2/1_TypescriptPart2/homework/easy1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Нужно заменить FIXME на тип который вычисляется на освове OrderState

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FIXME = any;
type FIXME = OrderState[];
Copy link

Choose a reason for hiding this comment

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

Здесь можно доработать с помощью Exclude


const orderStates = [
"initial",
Expand Down
2 changes: 1 addition & 1 deletion lessons/module2/1_TypescriptPart2/homework/easy2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Нужно заменить FIXME на тип который достанет из Order все возможные состояния (state)

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FIXME = any;
type FIXME = Order["state"];

type Order =
| {
Expand Down
2 changes: 1 addition & 1 deletion lessons/module2/1_TypescriptPart2/homework/easy3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Нужно заменить FIXME на соответствующий тип

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

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const omit = <T extends Record<any, any>, K extends keyof T>(
Expand Down