Skip to content

kvallieur/typeScript-basic-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript-basic-examples

  • Typescript is a superset of javascript. It has matured a lot since its inception.
  • It helps a developer to write clean javscript code
  • In addition to javascript typescript has some additional features like Enums, Tuples, Types, etc.

Types:

  • similar to Java where method args can be declared with datatypes TS allows the same feature
  • Implicit typing is allowed. TS assumes based on the code and does the implicit typing

Typescript is like a developer tool that notifies the developer about code smells End of the day - TS transpiles the ts file into javascript file

how to transpile and run

$ tsc XXXX.ts

compiles and generates the js file

$ node XXXX.js 

executes the compiled js file

$ tsc XXXX.ts --watch 

will automatically compile the changes when a file is modified

running as a npm project

a package.json file is present with the task start. the 'start' task executes the typescript compilation and runs the index.js file

$ npm start

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published