Code Monkey home page Code Monkey logo

typescript-course's Introduction

TypeScript Course

Requirements

  • Optional: HTML, CSS, JS
  • Node.js and Npm
  • Console / Terminal Usage

Useful Commands

  • to transpile: tsc myfile.ts
    • all files: tsc *.ts
    • target Option: --target ES5
  • to execute your transpiled file: node myfile.js, because is js you can use it on whatever js enviroment

Considerations

  • Ts will generate an output JS, even with errors

More Info

  • (Typescript Github)[]
    • typescript components
  • compile or transpile?

Tools:

  • TS PlayGround
  • Intellisense
  • typescript(npm or yarn)
  • Visual Studio
  • vsCode

You can Learn from this Code

- transpile a .ts file to .js file
- basics
    - hello world
    - strong typing
    - syntatic sugar
    - types or optional static type annotation
    - scope variables
    - avoid type juggling
    - type coercion
- types
- ts added optional static type annotation to js
- transform it in a strongly typed programming language
  • functions

  • objects

  • ambient declarations

  • interfaces

  • clases: Person.ts

  • enums

  • modules

  • generic types

  • file extension .d.ts, third libs compatibility

  • type coercion

  • tsconfig.json

Appendix

  • how to debuggin ts file with vs Code
  • configure tsconfig.json
  • how to configure ts compiler with visual studio Code
    • go to "Open User Settings"
    • go to settings.json at "typescript.sdk", by default the property has the value null
    • obtain where is installed npm modules: npm root -g
    • append the path with /typescript/lib as SDK path
  • to configure a build task
    • to configure Tasks: Ctrl + shift + P > Tasks > Typescript
    • to execute: Ctrl/cmd + Shift + B
  • how to ignore js outputs from ts

typescript-course's People

Contributors

fazt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.