Select a subset of properties.
Section: Utility Types
Use `Pick<T, K>`
typescript
typescript
type User = { id: number; name: string; email: string };
type PublicUser = Pick<User, "id" | "name">;Explanation
Useful for API DTOs and lightweight derived shapes.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Utility Types