Giter Site home page Giter Site logo

adilmalik11 / typescriptbasic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shahedbd/typescriptbasic

0.0 0.0 0.0 21 KB

TypeScript is a typed superset of JavaScript compiled to JavaScript. In other words, TypeScript is JavaScript plus some additional features.

License: MIT License

JavaScript 55.31% TypeScript 44.69%

typescriptbasic's Introduction

Getting Started with TypeScript

Installation

Install TypeScript

$ sudo npm install -g typescript

Check Version

$ node -v
$ tsc -v

Code Format in Editor

  • ⇧⌥F

TypeScript in Visual Studio Code

https://code.visualstudio.com/docs/languages/typescript

First Program:

let myMessage = "Hello world from type script";
console.log(myMessage);

Run Program:

$ tsc HelloWorld.ts
$ node HelloWorld

Watch Program

tsc main.ts --watch

Comments in TypeScript

  • Single-line comments ( // )
  • Multi-line comments (/* */)

Data Types

Data type Keyword Description
Number Number Double precision 64-bit floating point values. It can be used to represent both, integers and fractions.
String String Represents a sequence of Unicode characters
Boolean boolean Represents logical values, true and false
Void Void Used on function return types to represent non-returning functions
Null Null Represents an intentional absence of an object value.
Undefined Undefined Denotes value given to all uninitialized variables

Useful References

typescriptbasic's People

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.