← Phòng luyện tậpOnline Testing · 20 câu
TypeScript: suy luận và giới hạn hợp đồng tĩnh
20 câu về object types, optional/index access, generic/conditional/mapped types và contract của pipeline build.
Nội dung luyện tập
- readonly is shallow
- unknown requires check
- object property literal widening
- generic preserves number
- optional not explicit undefined
- unchecked index undefined
- fresh excess versus structural alias
- partial does not recurse
- tuple spread fixed arity
- contextual void discards static result
- callback property method variance
- conditional distribution control
- keyof union common keys
- mapped key remap exclusion
- overload implementation not call signature
- constraint not complete generic value
- declaration runtime version contract
- type only import removes initializer
- skiplibcheck does not repair contract
- emitted javascript not typecheck success
Mỗi câu đúng 1 điểm. Mục tiêu 70%. Đáp án và giải thích mở sau khi nộp bài.