1interface PageInfo {
2 title: string;
3}
4
5type Page = "home" | "about" | "contact";
6
7const nav: Record<Page, PageInfo> = {
8 about: { title: "about" },
9 contact: { title: "contact" },
10 home: { title: "home" },
11};
12
13nav.about;
14// ^ = Could not get LSP result: v.a>bTry
1interface Todo {
2 title: string;
3 description: string;
4 completed: boolean;
5 createdAt: number;
6}
7
8type TodoPreview = Omit<Todo, "description">;
1tstype Person = { name: string; age: number; location: string;};type QuantumPerson = Omit<Person, "location">;// equivalent totype QuantumPerson = { name: string; age: number;};