Skip to content

cesarlpb/learn-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

learn-ts

TS time!

Teoría: https://www.w3schools.com/typescript/typescript_intro.php


Node

Typescript

  • Instalamos Typescript:
    npm install typescript --save-dev
  • Corremos TS:
    npx tsc
  • Config en tsconfig.json:
    {
    "include": ["src"],
    "compilerOptions": {
        ...
        "outDir": "./build"
    }
    }

Build (genera .js a partir de .ts):

    npx tsc

Comprobaciones de tipos en runtime (.js) con Zod:

    npm install install vite zod 
  • Instalar dependencias: npm install

  • Ejecutar entorno de desarrollo: npm run dev

  • Build:

    npm build

Genera carpeta dist con archivos

About

TS time!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published