ENع
الدرس 10 · Core type system

Classes in TypeScript

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

A class is a blueprint for objects. Follow a twelve-line program as new builds two objects, the constructor fills their fields, and a method changes one object's balance through this, until 75 is printed. Then see TypeScript's part: typed fields, a private balance that tsc refuses to let outside code touch, and why that check is erased from the JavaScript that runs.

11 دقيقة8 خطوات5 أسئلةBeginner
شكل 10 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.