Volver al curso

TypeScript Completo

leccion
1 / 13
beginner
10 horas
Fundamentos de tipos

Configurar TypeScript y entender el compilador

Lectura
15 min~1 min lectura

Configurar TypeScript

Vas a configurar TypeScript, entender tsconfig y el flujo de compilacion. Objetivo: saber que se compila, cuando y por que.

Conceptos clave

  • tsconfig.json: target, module, strict
  • Diferencia entre type-check y build
  • tsc vs tsx (dev) y scripts

Ejemplo

pnpm add -D typescript tsx
npx tsc --init

# type-check
npx tsc --noEmit

# correr TS en dev
pnpm tsx src/index.ts

Ejercicio

  • Crea un proyecto minimo con tsconfig en modo strict.
  • Escribe 1 archivo TS con un error intencional y corre tsc --noEmit.

Checklist de mastery

  • Se que hace strict y por que conviene.
  • Puedo correr type-check en CI.