Kuis Advanced Types — TypeScript

Kuis materi Advanced Types di TypeScript — uji pemahamanmu dengan pertanyaan pilihan ganda, penjelasan jawaban, dan skor langsung. Main gratis di Hyper Sheets.

Pertanyaan di kuis ini

  1. Lengkapi conditional type:
    type IsString<T> = T ___ string ? "yes" : "no";
  2. Lengkapi mapped type untuk membuat semua properti readonly:
    type Readonly<T> = { ___ [K in keyof T]: T[K] }
  3. Keyword apa di TypeScript untuk mengekstrak tipe dari sebuah ekspresi?