Node.js Typescript

https://code.msdn.microsoft.com/

https://www.tutorialspoint.com/typescript/typescript_types.htm
https://www.tutorialspoint.com/angularjs/index.htm

Node.js is an open source, cross-platform runtime environment for server-side JavaScript. Node.js is required to run JavaScript without a browser support. It uses Google V8 JavaScript engine to execute code. You may download Node.js source code or a pre-built installer for your platform.

https://www.tutorialspoint.com/typescript/typescript_environment_setup.htm


TypeScript

let isDone: boolean = false;
let decimal: number = 6;
let color: string = "blue";

let a: null = null;

let b: number = 123;

let c: number = 123.456;

let d: string = ‘Geeks’;

let e: undefined = undefined;

let f: boolean = true;

let g: number = 0b111001; // Binary

let h: number = 0o436; // Octal

let i: number = 0xadf0d; // Hexa-Decimal

In built-in data types, any is a special data-type, also the super data-type of all data types. If a variable is declared with any data type then we can assign any type value to that variable.

Examples:


let a: any = null;

let b: any =123;

let c: any = 123.456;

let d: any = ‘Geeks’;

let e: any = undefined;

let f: any = true;

let dynamicList: any[] = [ "Kunal Chowdhury",

                           "Free User",

                           21,

                           true

                         ]; 

const announcement = "Hello World!";

const user = {
name: "Daniel",
age: 26,
};

Tuple Types

// correct
let person: [string, number] = ["Kunal", 2018];
------------------------------------------------------

Array types can be written in one of two ways. In the first, you use the type of the elements followed by [] to denote an array of that element type:

let list: number[] = [1, 2, 3];
Try

The second way uses a generic array type, Array<elemType>:

let list: Array<number> = [1, 2, 3];

-------------------------------------------------
let firstName: string = "Kunal"; let lastName: string = "Chowdhury";
let message: string = `Hi, my name is: ${firstName} ${lastName}`; let spannedMessage: string = `Hi, My name is: ${firstName} ${lastName}`;


let dynamicValue: any = "Kunal Chowdhury";

By default, the enum values start from 0 (zero), but you can also set it by manually entering the value of its members. Consider the following two examples:









Comments

Popular posts from this blog

Travel RESUME CV

PTE