Take your projects to the next level with type safety, scalability, and modern JavaScript features. Eka Sunucu's high performance VDS and Cloud Publish your TypeScript projects (Node.js, NestJS, Next.js) in seconds with its infrastructure.
TypeScript is an open source programming language developed and maintained by Microsoft. basically It is a strict syntactic superset of JavaScript and adds optional static typing. TypeScript is designed for the development of large-scale applications and is transpiled to JavaScript.
As of 2026 , TypeScript usage in the web development ecosystem (React, Angular, Vue, Svelte, Node.js) has increased to over 90%. In large projects, type safety ensures that errors are caught at the compilation stage and minimizes runtime errors.
Catch errors while writing code by determining variable types.
To start using TypeScript, first run it on your computer. Node.js must be installed. Then you can install the TypeScript compiler globally using NPM (Node Package Manager).
# TypeScript'i global as yükle npm install -g typescript # Versiyonu kontrol et tsc --version # Projectct klasöründe tsconfig.json create tsc --init
tsconfig.json file is located in the root directory of your TypeScript project and specifies compiler options. The recommended basic configuration for a Node.js project that you will host on Eka Sunucu VDSs is as follows:
{
"compilerOptions": {
"target": "es2022", // Çıktı JS version (Modern Servers for)
"module": "commonjs", // Modül sistemi
"outDir": "./dist", // Derlenen dosyaların gideceği yer
"rootDir": "./src", // Kaynak kodların yeri
"strict": true, // Katı tip control (Önerilir)
"esModuleInterop": true, // CommonJS ve ES modülleri arası uyum
"skipLibCheck": true // Kütüphane tip kontrollerini atla (Speed for)
}
}
TypeScript's greatest strength is its ability to assign types to variables, function parameters, and return values. This allows the code to be self-documenting.
// Temel Tipler let sirketAdi: string = "Eka Sunucu"; let kurulusYili: number = 2010; let aktifMi: boolean = true; // Dizi (Array) Tanımlama let hizmetler: string[] = ["Web Hosting", "VDS", "Software"]; // Alternatif yazım (Generic Array) let paketPricelari: Array<number> = [150, 250, 500]; // Tuple (Sabit uzunluklu ve tipli dizi) let sunucuDurumu: [number, string] = [200, "OK"]; // Enum (Numaralandırma - Çok kullanışlıdır) enum Role { ADMIN, USER, GUEST } let currentUserRole: Role = Role.ADMIN; // Fonksiyonlarda Tip Tanımlama function fiyatAccountla(fiyat: number, kdv: number): number { return fiyat + (fiyat * kdv); } console.log(fiyatAccountla(1000, 0.20)); // Çıktı: 1200
To standardize data structures in large projects interface and for reusable code blocks Generics is used.
// Interface ile Veri Modeli Creation interface Sunucu { id: number; hostname: string; ip: string; isActive: boolean; ozellikler?: string[]; // ? işareti opsiyonel olduğunu belirtir } const yeniSunucu: Sunucu = { id: 1, hostname: "vds-01.ekasunucu.com", ip: "192.168.1.1", isActive: true }; // Generics: Esnek Fonksiyonlar // T: Type değişkeni (herhangi bir tip olabilir) function kimlikDondur<T>(arg: T): T { return arg; } let sayi = kimlikDondur<number>(50); // number döner let yazi = kimlikDondur<string>("Eka"); // string döner
In 2026 Google and other search engines, Core Web Vitals (INP - Interaction to Next Paint) attaches more importance to metrics than ever before. TypeScript directly contributes to these metrics by making the code more compact and optimized.
SPA (Single Page Application) applications written with TypeScript prevent unnecessary re-renders and accelerate page response time thanks to type safety.
Managing Schema.org (JSON-LD) integrations with TypeScript interfaces ensures that the data structure is error-free and Google understands the content %100 correctly.
TypeScript-based frameworks such as Next.js perform Server Side Rendering, allowing the content to be instantly read by bots. This is Eka Sunucu's On VDS servers works perfectly.
Clean Code principles become mandatory with TS. This helps search engine bots crawl the site structure more easily.
Ordinary hosting is not enough to host your Node.js, NestJS or React applications. For your application's build processes and runtime performance NVMe SSD You need servers with disks and high processing power.
The ideal starter for TypeScript projects.