
Explore the fundamentals of TypeScript, including types, data types, variables, operators, control flow, object literals, arrays, functions, and object oriented concepts like interfaces, classes, inheritance, typecasting, and transcompiling to JavaScript.
Learn how this TypeScript course is organized into short sections with quizzes and hands-on assignments, supported by Q&A and Visual Studio Code setup.
Discover how this course is organized into sections with short, concise lectures, quizzes, and hands-on assignments using Visual Studio Code to master TypeScript.
Explore TypeScript in an online playground, write strictly typed code, and see how TypeScript transcompiles to JavaScript, with variables, functions, and classes, while observing compile-time errors and browser execution.
Install TypeScript using npm, verify Node.js and npm installations, install TypeScript globally with npm -g, and confirm the TypeScript compiler version with tsc -v.
Explore the TypeScript playground for quick practice and install Visual Studio Code to manage projects, drag folders into the editor, and learn TypeScript with React JS and Angular JS.
Engage in a hands-on TypeScript learning experience by building several files from scratch. Download the completed scripts from the resources section to reference as you practice and master TypeScript.
Explore how variables act as data containers in TypeScript, carrying types like number, string, boolean, any, and enum, and see compile-time errors for mismatched values and object types via classes.
Set up a variables folder in your project and create variables.ts in Visual Studio Code. Transpile the TypeScript file to JavaScript with tsc and view output in the same folder.
Create a variables.html file, include variables.js with a script tag, and open Chrome to view the console output that shows the transpiled JavaScript running.
Define variables of type string using double quotes, single quotes, or backticks, assign string literals, and print them with console.log after transpiling to JavaScript.
Define boolean variables in TypeScript to hold true or false and drive conditional logic. Observe how assigning a string triggers a compilation error and how tsc compiles to reveal results.
Explore the any type in TypeScript for beginners and learn how to assign any data type to a variable using a1:any, including strings, numbers, and json objects.
Define homogeneous arrays by specifying a type inside angle brackets, creating a string array. Access elements using zero-based indices and explore properties such as length.
Learn how to create heterogenous arrays in TypeScript for beginners by using the any type to store numbers, objects, strings, and booleans, unlike homogeneous arrays.
Explore using alert, confirm, and prompt in TypeScript, transpile to JavaScript with tsc, and see how user input via prompt flows into console logs and browser popups.
Learn to use single line and multiline comments in TypeScript to explain code, temporarily disable code, and understand how comments translate to JavaScript.
Explore defining and using enums in TypeScript, including Gender and WeekEnds, accessing read-only values by index or bracket syntax, and changing indexes with the equals operator.
Explore the string type in TypeScript, using single, double, and backtick quotes with expressions like ${username}, and apply escape sequences such as \n and \\ in strings.
Explore TypeScript string functions that mirror JavaScript, including length, charAt, indexOf, lastIndexOf, startsWith, endsWith, split, substring, and toUpperCase and toLowerCase.
Explore union types in TypeScript, which allow a variable to hold both strings and numbers using the pipe symbol, demonstrated with a union type file and compile-time checks.
Explore TypeScript arithmetic operators like addition, subtraction, multiplication, division, and modulus by creating arithmetic.ts, transpiling to arithmetic.js, and viewing results in the browser console.
Learn how the assignment operator works in TypeScript, including type inference, numeric variables, and compound assignments like +=, -=, *=, /=, and %=.
Compare values using the comparison operators in TypeScript for beginners; learn ===, !==, <, >, <=, >= and how booleans evaluate to true or false with practical examples.
Explore logical operators in TypeScript for beginners, including and (&&), or (||). Learn how they evaluate to boolean true or false with literal values and expressions, and use not (!).
Learn the ternary operator in TypeScript by evaluating a test expression and returning the left or right value based on true or false, with an example comparing x and y.
Learn arithmetic, assignment, and comparison operators (including += and ===), plus logical operators and the ternary shortcut for conditionals.
Explore how flow control statements determine runtime execution, covering selection statements like if-else and switch, iterative loops such as while and for, and transfer statements like break and return.
Learn to implement if-else and else-if ladders in TypeScript to compare x, y, and z, handle greater-than logic, and view results after transcompiling in the browser.
Compare the switch statement to an if-else ladder and learn its syntax with cases and a default in TypeScript; only the matching case runs, with break to control flow.
Explore the switch statement in TypeScript, learn how break prevents fall-through, how to share logic across case 1 and case 2, and ensure only one case executes after a break.
Explore the while loop in TypeScript for beginners, showing its syntax, boolean condition, and printing 1 to 10 with i++ and prefix vs postfix increments.
Master if-else syntax and if-else ladder to conditionally execute code. Compare switch with break to avoid fall-through, and preview while and for loops.
Develop a simple TypeScript email validator using indexOf to check for @ and dot, creating email validator dot ts, and using if-else logic with future regex enhancements.
Validate a password in TypeScript by ensuring the first character is uppercase via charCodeAt; compile with tsc and view results in the browser.
Learn how objects model real world problems in TypeScript, using object literals and blueprints via interfaces and classes, with ES6 features.
Learn to declare and access objects in TypeScript with literal syntax, mirroring JavaScript. Create objects with properties and use the dot operator to access name and score.
Learn the for in loop syntax to iterate over object properties in TypeScript, assigning each key to a variable and accessing values with bracket notation. See the student object example.
Learn how to define and manipulate TypeScript arrays, push elements with push, handle string and any types, and iterate with a for loop to display all elements.
Learn how to use array destructuring in TypeScript to unpack values like Angular, React, and ES6 from an array, replacing manual accesses with left-to-right assignments.
Learn how to de-structure objects in TypeScript by extracting firstName and lastName into variables, logging them, and understanding that property names must match the object's keys for successful destructuring.
Learn essential array methods in TypeScript for beginners, including toString, join, slice, splice, push, and pop to transform and manage numeric arrays.
Explore defining and invoking functions in TypeScript, with strict parameter and return types, and see examples like place order and display page to handle business logic and UI events.
Create a TypeScript function named Hello that returns a string, invoke it with console.log, then transpile to JavaScript and reference it in an HTML file to display the output.
Learn how to pass a string parameter to a function in TypeScript, compare type annotations with JavaScript, and fix transpile errors by supplying arguments to produce a hello message.
Learn how to pass multiple parameters to a TypeScript function by defining add with two numbers returning a number. Invoke it with 10 and 20 to get 30.
Learn how to declare optional parameters in TypeScript, use the question mark syntax, and handle undefined values to ensure functions like display gracefully render id, name, and role.
learn to assign default values to optional parameters in TypeScript using the equals sign; set a default role of 'normal' and see how it's overridden when a value is passed.
Learn to pass functions as arguments in TypeScript by building a calculator function that invokes any function with two parameters and displays the result.
Discover how a function can return another function in TypeScript, using a calculator example where subtract is an inner function returned for later invocation.
Convert a named hello function to an anonymous function, assign it to a variable for invocation, and use anonymous functions inside other functions as callbacks with proper scope.
Learn to implement function overloading in TypeScript with a double me function that doubles numbers and duplicates strings, then restrict overloads to number and string via explicit signatures.
Learn how to pass any number of parameters to a function in TypeScript using rest params, enabling variadic functions that multiply all inputs, as shown in the varargs.ts example.
Learn how rest parameters accept a variable number of arguments in TypeScript, must appear last in the function signature, and can be constrained to number or string arrays.
Learn how to pass parameters to an arrow function in TypeScript, define typed arguments, use the fat arrow, return type, and compute a product with console output.
Push ten anonymous arrow functions into a TypeScript array with a for loop, then invoke them in a second loop to log numbers 0 through 9.
Explore arrow functions in TypeScript, creating anonymous functions with parameters and a return type. Pass them as parameters and push into arrays, using the arrow symbol and braces for execution.
Explore the let prefix and block scope in TypeScript, contrasting it with var and function scope, and see how let restricts loop variables and how TypeScript works around ES6 limits.
Explore how const in TypeScript prevents value changes, mirroring final in C/C++, with a practical VS Code demo and notes on ES6 compatibility and transpiled JavaScript behavior.
Learn how using const with function declarations prevents reassigning a function to a different implementation, guarding product calculations and ensuring consistent return types in TypeScript.
Use the declare keyword to define ambient variables from external libraries that aren't directly in our files, and contrast declare with var while noting we won't import external libraries.
Explore var and let in TypeScript for beginners, covering hoisting and block scope. Learn constants and how const prevents reassignment, with its use in function declarations.
Define an interface to enforce a consistent student object shape in TypeScript, specifying properties like firstName, lastName, and score, and learn how interfaces act as compile-time contracts.
Define a product interface in TypeScript with id, name, description, and price, using number and string types, placed in an interfaces folder as Product.ts.
Explain how to create a product object that complies with a TypeScript interface, enforcing required properties, correct types, and known property names to ensure type safety across objects.
Define optional properties in TypeScript interfaces using a question mark. This makes properties optional and allows omission without errors; removing the question mark triggers a warning.
Use TypeScript interfaces to enforce compile-time checks, while understanding they do not exist at runtime. Ensure objects comply with the interface during compilation by inspecting generated JavaScript after running tsc.
Learn how functional interfaces define function signatures in TypeScript, implement add and subtract as subscribers to interfaces, enforce type safety with parameter and return types, and handle mismatches.
Learn how return types operate in TypeScript functional interfaces, including void and optional returns that can be overridden, and note that fixed types cannot be changed.
Define a display method in a product interface and implement it across all complying objects, ensuring each class provides the method to avoid type errors.
Explore numeric index and string based index interfaces for arrays in TypeScript, using the interface keyword to define a string array named StudentNames. See how numbers fail with strings.
Define string index based interfaces to map student names to scores in TypeScript. Use a for-in loop to iterate keys and access scores by name in a practical object-like interface.
Extend interfaces to compose a car from exterior and interior properties using the extends keyword. Build a car object with make, model, year, color, doors, seats, and auto.
Define contracts for objects and functions with interfaces using the colon operator, including properties, optional properties, and extended interfaces, and enforce exact signatures and array typing at compile time only.
Learn how classes in TypeScript work as runtime blueprints, define constructors and accessors, implement methods, and contrast them with interfaces using a Flight class example.
Define a passenger class in TypeScript with firstName, lastName, and frequentFlyerNo, create objects, and learn to initialize properties with a constructor.
Define a TypeScript constructor to initialize object properties with firstName, lastName, and frequentFlyerNo, using this to assign values; create objects like passenger1 John Bailey 123 and passenger2 Bob 456.
Add function properties to a class by defining a display method that uses this.firstName, this.lastName, and this.frequentFlyerNo to show passenger details, then call passenger.display() and passenger2.display().
Discover how TypeScript makes object creation easier with the simple class syntax, avoiding the function-based approach shown in Passenger.js.
Learn to use the for-in loop in TypeScript to access object properties and values, and filter out functions with the instanceof operator and continue to log only data properties.
Define an interface with flightNo, from, and to, then implement it in a class that initializes these properties and a display method to log the flight details.
Define a class as a blueprint with properties and a constructor, then create instances with new and access members via dot operator. Iterate with for-in, use instanceof, and implement interfaces.
The ONLY course that teaches all the TypeScript Fundamentals required to work with Angular !
Sample of the reviews:
Very clear explanation ! Perfect course to begin with Typescript! -Brice Lallement
It was a good starting point for a beginner like me. I did not use JavaScript before, but the TypeScript course was an excellent introduction. Thank you Bharath Thippireddy - Ana Nasture
All source code is available for download
Responsive Instructor - All questions answered within 24 hours
Professional video and audio recordings (check the free previews)
If you are JavaScript developer who wants to learn TypeScript in depth and also master then this course is for you. If you are a developer with any other object oriented programming language background and want to learn AngularJS in the future then this course is for you too .TypeScript is is used by many popular JavaScript frameworks like AngularJS , VueJS etc by. You should have used JavaScript before you take this course.
JavaScript does not use structures like classes to implement object oriented programming.This can be confusing for programmers coming from Java ,C++ or python background. This course covers how TypeScript provides structures like Java ,Python etc that will make our life easier. It will also be easy for you to learn newer versions of JavaScript in like ES 6/7 in the future once you master TypeScript.
What Will I Learn?
Learn how to define variables using data types
Create functions that take optional, default and variable number of arguments
Create and use arrow functions
Use Interfaces to define a contract for objects , functions and arrays
Use the different types of variable prefixes like let and const
Learn the key Object Oriented Principles
Create objects using classes
Reuse Objects through Inheritance
Use the different access modifiers
Encapsulate your classes/objects
What are the requirements?
Visual Studio Code IDE ,Web Browser(Chrome, Firefox, IE etc)