Skip to content

ต้องเข้าใจว่า Bun, Vite, Nuxt, Node รองรับ typescript ในตัว

ทำให้เราไมต้องใช้ tsc run src/index.ts เราสามาถใช้เช่น bun run src/index.ts ได้เลย

ตัวอย่าง

sh
npm install -d typescript
sh
pnpm install -d typescript
sh
bun add -d typescript
package.json
json
{
  "name": "typescript-quick-start",
  "scripts": {
    "dev": "bun run index.js"
  },
  "devDependencies": {
    "typescript": "^5.0.0"
  }
}