TypeScript 101

TypeScript Tutorial to Get You Going
    let example1: boolean = true;
    
    let example2: number = 35;
    
    let example3: string = 'Hello World';
    let example1: boolean = true;
    
    let example2: number = 35;
    
    let example3: string = 'Hello world';
    let example1: boolean | number = 35;
    
    let example2: number = undefined;
    
    let example3: string = 'Hello world';
    
    let example4: undefined = undefined;
    
    let example5: null = null;
    const arrayExample = [1, 3, 4, 5];
    
    let example1: boolean | number = 35;
    
    let example2 = arrayExample.reduce((num1, num2) => num1 + num2);
    
    
    let example3 = 'Hello world';
    
    let example4: undefined = undefined;
    
    let example5: null = null;
    import { Bear } from './bear.model'; 
    
    const bear = new Bear(3);
    
    if (bear instanceof Bear) {
        console.log("Hello from TypeScript");
    }
    
    let definetlyNotAString: any = 'I am a string';
    
    let strLength = (<string> definetlyNotAString).length;
    const example1: string[] = ['Hello World'];
    
    const example2: (number | boolean)[] = [1, 2, true];
    
    const example3: boolean[] = [true, false];
    const exampleTuple: [string, number] = ['https://www.YouTube.com/CodingTutorials360', 30];
    export enum Names {
        mine,
        moms
    }
    const example1: object = undefined;
    
    const example2: Object = undefined;
    
    const example3: {} = undefined;
    
    import { Person } from './person.model';
    
    function add(val1: number, val2: number) {
        return val1 + val2;
    }
    
    add(1, 10);
    
    function sayHello(person: Person) {
        return `Say Hello to My Little Friend, ${person.firstName}!`    
    }
    
    sayHello(new Person({}))
    import { Person } from './person.model';
    
    function add(val1: number, val2: number): number {
        return val1 + val2;
    }
    
    function sayHello(person: Person): string {
        return `Say Hello to My Little Friend, ${person.firstName}!`    
    }
    
    function voidExample(): void {
        add(1,2);
    }
    
    type person = {firstName: string};
    
    const example1: object = undefined;
    
    const example2: Object = NaN;
    
    const example3: person = {firstName: 'Dollan'};
    
    example3.firstName = 'Dylan';
    export interface Person {
        firstName: string;
        middleName:
        lastName: string;
    }
    export * from './bear.interface';
    export * from './man.interface';
    export * from ''
    import { Person } from './person.model';
    
    const example1: Person = {firstName: 'Dollan', middleName: 'Dollan', lastName: 'Dollan'};
    
    example1.firstName = 'Dylan';
    example1.middleName = 'Coding God';
    example1.lastName = 'Israel';
    import { Bear, Man, Pig } from './interfaces';
    
    let man: Man | Pig;
    let bear: Bear;
    let pig: Pig;
    
    type ManBearPig = Bear & Man & Pig
    
    let manBearPig: ManBearPig ;
    manBearPig.firstName = 'Dylan';
    manBearPig.claws = 3;
    manBearPig.bacon = false;
    function example<T>(arg: T[]): T {
        
        return arg;
    }
    
    example(5);
    import { Animal } from './animal.model';
    
    export class Bear extends Animal{
        public claws: number;
        readonly name: string;
        private tail: boolean;
        
        constructor(data?: any) {
            super(data);
            this.claws = data.claws;
            this.name = data.name;
            this.tail = data.tail;
        }
        
    <html>
        <head>
            <script src="index.pack.js"></script>
        </head>
        <body>
        </body>
    </html>