GithubHelp home page GithubHelp logo

typescript-hero's Introduction

Typescript

Typescript

In this repo you will find step by step learning on typos. As and entry-level learning process.

Development

Initializing a project w/ typescript con auto-update and predefined configuration:

npx tsc --init --sourceMap --rootDir src --outDir dist

Methods to debug and run TS files:

  1. Library to transpiled the typescripts files w/ node from Backend development: TS-Node
  2. Run and debug VS-code.
    1. Create a launch.json file โ†’ Node.js
    2. Transpiled the TS files (optional: npx tsc --watch)

Topics covered in this repo ๐Ÿชฒ

Basic

  • Primitive typos:
    • Number, boolean, String, Array
  • Special data types:
    • Any, union type
    • Aliases | Literal types
    • Null or undefined
    • Functions
    • Return values
    • Objects inside Functions
    • Objects as types
    • Modules

Starting point

A used case of typescript:

let productPrice = 100; //Inference type of number
let productStock: number; // Declarative without assigned value

// โŒ Bad practices
console.log(productStock); // Variable should have a value
productStock = productPrice + "It cannot sum"; // Only accepts numbers

For more in-depth of this topics I will write down each use case on the notes folder.

Feel free to share your knowledged in Typos ๐Ÿง˜๐Ÿปโ€โ™‚๏ธ

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.