This course will provide an introduction to TypeScript, a superset of JavaScript that adds optional static typing and other features to improve the maintainability and scalability of large-scale web applications. Students will learn the syntax and features of TypeScript and gain practical experience in using it to build web applications.
- What is TypeScript
- Why is it important
- Basic syntax and types in TypeScript
- Union and Intersection types
- Type aliases and interfaces
- Type guards and assertions
- Optional chaining and nullish coalescing
- Chapter 1 and 2 MC Test
- Chapter 1 and 2 Problems
- Abstract classes and interfaces
- Access modifiers
- Generics
- Chapter 3 Coding Test
- Understanding async and await
- Using promises and async/await with TypeScript
- Handling errors with try/catch
- Chapter 4 Coding Test
- Using TypeScript with popular frameworks such React
- Typing third-party libraries with type definition files
- Using decorators to add metadata to classes and methods
- Starting a Typescript project
- Writing tests with Jest and TypeScript
- Debugging TypeScript code with VS Code
- Troubleshooting common TypeScript errors
- Chapter 6 quiz
- Building and deploying TypeScript applications
- Using tools like Webpack and Babel to transpile TypeScript to JavaScript
- Best practices for maintaining and scaling TypeScript applications
- Deploy Typescript project
- Access to a computer with an internet connection and a code editor (e.g. Visual Studio Code)
- Familiarity with HTML and CSS
- NPM/Yarn Installed
- Node version 16 or greater
- Understanding of basic JavaScript concepts:
- variable declaration (let, const, var)
- functions (func declaration , fat arrow, func expression)
- returns
- typeofs
- iterations
- arrays
- objects
- JS Classes
- primative datatypes
- null
- numbers
- string
- booleans
- React.js
Before you begin the course, please set up your coding enviornment to support TypeScript. I will be assuming you are using VS Code
Open the Terminal application on your Mac.
Install Node.js and npm (Node Package Manager) by running the following command in the terminal:
brew install node
Verify that Node.js and npm are installed correctly by running the following commands:
node -v
npm -v
node version should be: version 16.0.0 or greater npm version should be: 9.0.0 or greater
Install TypeScript by running the following command in the terminal:
npm install -g typescript
Verify that TypeScript is installed correctly by running the following command:
tsc -v
Version should be 4.8.3 or greater
If the command outputs the version number of TypeScript, then it has been successfully installed on your Mac.
Note: If you encounter any permission errors during the installation, you may need to run the above commands with sudo privileges by prefixing them with sudo.
Download and install Node.js from the official website: https://nodejs.org/en/download/
Open the Command Prompt application on your Windows machine.
Verify that Node.js and npm (Node Package Manager) are installed correctly by running the following commands in the Command Prompt:
node -v
npm -v
node version should be: version 16.0.0 or greater npm version should be: 9.0.0 or greater
Install TypeScript by running the following command in the Command Prompt:
npm install -g typescript
Verify that TypeScript is installed correctly by running the following command:
tsc -v
Version should be 4.8.3 or greater
If the command outputs the version number of TypeScript, then it has been successfully installed on your Windows machine.
Note: If you encounter any permission errors during the installation, you may need to run the above commands with Administrator privileges by right-clicking on the Command Prompt and selecting "Run as administrator".