build.log
Quay lai ghi chu
TypeScript
Cap nhat 17 thg 2, 2026

TypeScript Utility Types Reference

Complete reference for built-in TypeScript utility types with practical examples.

typescript
reference
utility-types

Partial<T> Makes all properties optional. Use for update functions where you only change some fields.

Required<T> Opposite of Partial. Makes all properties required.

Pick<T, K> Creates a type with only the specified properties. Great for form types that use a subset of a model.

Omit<T, K> Creates a type without the specified properties. Useful for removing internal fields before sending data.

Record<K, V> Creates an object type with keys of type K and values of type V. Perfect for lookup maps.

Extract<T, U> & Exclude<T, U> Filter union types. Extract keeps matching members, Exclude removes them.