Go beyond the basics. Learn advanced TypeScript patterns that separate good engineers from great ones. Bilingual — hover or tap any paragraph to reveal Vietnamese translation.
Compose behaviour from multiple sources without multiple inheritance
Type-level if/else to transform and extract types at compile time
Build string union types dynamically with template literal syntax
Meta-programming with class, method, and property decorators
Compose reusable behaviours across class hierarchies without multiple inheritance
Kết hợp các hành vi tái sử dụng qua các class mà không cần đa kế thừa
Type-level if/else expressions that unlock advanced type transformations
Biểu thức if/else ở cấp độ kiểu để mở khoá các phép biến đổi kiểu nâng cao
Build string types dynamically with template literal syntax
Xây dựng kiểu chuỗi động với cú pháp template literal
Transform existing types by iterating over their keys
Biến đổi kiểu hiện có bằng cách lặp qua các key của chúng
Extract and name types from within conditional type branches
Trích xuất và đặt tên kiểu trong các nhánh kiểu điều kiện
Extend interfaces, namespaces, and modules with declaration merging
Mở rộng interface, namespace và module với hợp nhất khai báo
Narrow union types precisely with user-defined type predicates
Thu hẹp union type chính xác với type predicate do người dùng định nghĩa
Class, method, and property decorators for meta-programming
Decorator cho class, method và property để lập trình meta
Master built-in utility types and build your own type library
Thành thạo utility type tích hợp và xây dựng thư viện kiểu của riêng bạn
Extend third-party library types without forking the source
Mở rộng kiểu thư viện bên thứ ba mà không cần fork source
Validate a value against a type without widening its inferred type
Kiểm tra giá trị theo một kiểu mà không làm rộng kiểu được suy luận
Model state with tagged unions and exhaustive narrowing via a never check
Mô hình hóa trạng thái với tagged union và thu hẹp toàn diện bằng never
Add nominal typing on top of TypeScript's structural type system
Thêm kiểu danh nghĩa lên trên hệ thống kiểu cấu trúc của TypeScript
Preserve literal and tuple types in inference without writing as const
Giữ kiểu literal và tuple khi suy luận mà không cần viết as const