Skip to content

🥋 TypeScript code in a JavaScript environment to learn the language's features and syntax. Course for C-11.

Notifications You must be signed in to change notification settings

jsohndata/practice-typescript-intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript (TS) Intro

TypeScript code in a JavaScript environment to learn the language's features and syntax. Course for C-11.

CLI

  • npx tsc
    install Typescript

  • tsc -h
    Show all the commands we can use.

  • tsc
    Compiles the current project into JavaScript.

  • tsc --init
    The -init initialize a TypeScript project. It creates a tsconfig.json file in the current directory, which is a configuration file that tells the TypeScript compiler how to compile your TypeScript code.


tsconfig.json

This is a configuration file for the TypeScript compiler. It specifies the root files and the compiler options required to compile the project. The presence of a tsconfig.json file in a directory indicates that the directory is the root of a TypeScript project.

  • "rootDir": "./src"
    Complies src directory

  • "outDir": "./build"
    Specify an output folder for all emitted files. */

  • type tsc to comlpile, then it'll generate a .js file.


Interface

  • Either starts with an I or T

About

🥋 TypeScript code in a JavaScript environment to learn the language's features and syntax. Course for C-11.

Topics

Resources

Stars

Watchers

Forks