Tüm Rehberler
TypeScript Kurulumu ve Yapılandırma
TypeScript'i projenize ekleyin ve tsconfig.json yapılandırmasını yapın.
Başlangıç10 dk
Kurulum Adımları
1. TypeScript'i kurun:
npm install -D typescript2. tsconfig.json oluşturun:
npx tsc --init3. Önerilen tsconfig.json ayarları:
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"outDir": "./dist",
"rootDir": "./src",
"declaration": true,
"sourceMap": true,
"resolveJsonModule": true,
"isolatedModules": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}4. Derleme:
npx tsc5. Watch modunda derleme:
npx tsc --watch6. Node.js ile TypeScript çalıştırma:
npm install -D tsx
npx tsx src/index.ts7. Type tanım dosyaları:
npm install -D @types/node @types/express8. package.json script'leri:
"scripts": {
"build": "tsc",
"dev": "tsx watch src/index.ts",
"start": "node dist/index.js"
}İlgili Rehberler
Vercel'e Deploy Etme
Next.js veya React projenizi Vercel platformuna deploy edin.
Netlify'a Deploy Etme
Statik site veya JAMstack projenizi Netlify'a deploy edin.
Bun Runtime Kurulumu
Bun JavaScript/TypeScript runtime'ını kurun. Node.js'e hızlı alternatif.
Deno Kurulumu
Deno JavaScript/TypeScript runtime'ını kurun. Güvenli ve modern alternatif.