ข้ามไปยังเนื้อหา

TypeScript Deep Dive

คอร์สแบบ standalone ระดับ intermediate→advanced ว่าด้วย type system ของ TypeScript ตั้งแต่ structural typing และ inference ไปจนถึง generics, conditional & mapped types, template literals, recursive types, decorators, compiler และการ type API จริง — ทุกหัวข้อสอนผ่าน code ที่ annotate ให้เห็นชัดว่า compiler infer อะไรออกมา

Foundations & Mental Model

ทำไมต้อง TypeScript, type คือเซตของ value, structural typing และ inference ทำงานจริงอย่างไร เริ่ม →

Everyday Types, Deep

literal และ widening, union และ intersection, object/array/tuple, function และ narrowing ฝึกให้คม →

Generics

type parameter, constraint, conditional type และ inference กับ infer ทำงานอย่างไร generalize →

Type-Level Programming

mapped types, template literal types, keyof และ indexed access, utility types และ recursion เขียน type →

Classes & Advanced OOP

field และ access, this type, stage-3 decorators และ mixin ออกแบบ →

The Compiler & Tooling

tsconfig ที่สำคัญ, module resolution, declaration file และ emit ตั้งค่า →

Practical Mastery

การ type API และ boundary, nullability และ never, pitfall เรื่อง performance และกลยุทธ์ migration นำไปใช้ →

type คือพระเอก

นี่คือคอร์สว่าด้วย type system ไม่ใช่ syntax ของ JavaScript ตัวอย่างทุกอันถูก annotate ให้เห็นชัดว่า compiler infer อะไรและ error ตรงไหน — แบบที่คุณอ่าน TypeScript จริง ๆ

เข้าใจ mental model ก่อน

ทุกหัวข้อเริ่มจาก model — type คือเซตของ value, structural compatibility, inference site — พอเข้าใจแล้ว feature ขั้นสูงจะเลิกดูเหมือนเวทมนตร์และกลายเป็นเรื่องที่สมเหตุสมผล

ลึก ไม่ใช่แค่วิธีใช้

ไม่ใช่แค่ “นี่คือ Partial<T>” แต่เป็น “นี่คือวิธีที่ Partial ถูกสร้างขึ้น และสร้างเองได้อย่างไร” คุณจะอ่านและเขียน type-level code ได้อย่างมั่นใจ

ไดอะแกรมที่อธิบายได้

type widening, narrowing flow, conditional-type distribution และ module resolution เป็นไดอะแกรม Mermaid ที่รองรับธีม สองภาษา (English / ไทย) พร้อมบันทึกความคืบหน้า quiz