1//INTERFACE TYPE
2interface Animal { type Animal = {
3 name: string; name: string;
4} }
5interface Bear extends Animal { type Bear = Animal & {
6 honey: boolean; honey: Boolean;
7} }
8
9const bear = getBear(); const bear = getBear();
10bear.name; bear.name;
11bear.honey; bear.honey;
1interface Todo { title: string; description: string; completed: boolean;}
2type TodoPreview = Pick<Todo, "title" | "completed">;
3const todo: TodoPreview = { title: "Clean room", completed: false,};
4todo; const todo: TodoPreviewTry