TypeScript'te OOP Sınıf Nesneleri Oluşturma
Diyelim ki User adında bir sınıfımız var:
typescriptclass User {
}
Bu sınıfın bir nesnesini oluşturalım:
typescriptlet user = new User;
Sınıf nesnesini içeren değişkenin türü, o sınıfın adı olmalıdır. Kodumuzu geliştirelim:
typescriptlet user: User = new User;
Задание 1
Employee sınıfından iki nesne oluşturun.