// Using 'typeof' to infer typesconst person = { name: "Alice", age: 30 };type PersonType = typeof person; // { name: string; age: number }// 'satisfies' to ensure a type matches but allows more specific typestype Animal = { name: string };const dog = { name: "Buddy", breed: "Golden Retriever" } satisfies Animal;// Generics with 'extends' and default valuesfunction identity<T extends number | string = string>(arg: T): T { return arg;}