// JavaScript that scales.
JAVASCRIPT WITH GUARDS.
TypeScript adds static typing to JavaScript, catching errors at compile time instead of runtime. It's JavaScript that self-documents, refactors safely, and scales with your project.
WHY TYPESCRIPT?
TypeScript is JavaScript with syntax for types. It helps you catch mistakes early through type checking and makes your code more maintainable. IDEs provide better autocomplete, refactoring, and inline documentation.
ADOPT TYPESCRIPT.
Major companies like Microsoft, Google, and Airbnb use TypeScript. It powers VS Code, Angular, and countless enterprise applications. Type errors are cheaper to fix than runtime bugs.
12 lessons. Complete TypeScript control.
Install TypeScript and understand why types matter.
BeginnerLearn string, number, boolean, arrays, and tuples.
BeginnerUnderstand how TypeScript infers types automatically.
BeginnerType function parameters, returns, and arrow functions.
BeginnerDefine object shapes and contracts with interfaces.
BeginnerCreate reusable type definitions with aliases.
IntermediateCombine types with unions and intersections.
IntermediateType classes with access modifiers and inheritance.
IntermediateWrite reusable, type-safe code with generics.
AdvancedMaster built-in types like Partial, Required, Pick, Omit.
AdvancedNarrow types with custom type predicates.
AdvancedCreate .d.ts files and work with untyped JavaScript.
AdvancedTypeScript was created by Microsoft in 2012 and released as open source in 2014. It was designed to address the challenges of building large JavaScript applications.
TypeScript is a superset of JavaScript that compiles to plain JavaScript. It adds optional static typing, classes, interfaces, and modules. Any valid JavaScript is valid TypeScript.
The TypeScript compiler (tsc) transforms TypeScript code into JavaScript that runs in any browser or Node.js environment. It provides excellent tooling support in VS Code and other editors.
The future of JavaScript is typed. Own it.
TypeScript is JavaScript with syntax for types. It helps you catch errors before your code runs. TypeScript compiles to plain JavaScript that works in any browser or Node.js environment.
1. TypeScript compiles to _____ .
2. Who created TypeScript?
1. What type opt out of type checking?
2. What type represents a fixed-size array?
TypeScript infers types when you don't specify them:
1. TypeScript infers types when _____ are not specified.
1. What symbol makes a parameter optional?
2. What collects remaining arguments into an array?
1. What makes a property unchangeable?
1. What keyword creates a type alias?
1. What symbol creates a union type?
2. What symbol combines types?
1. What modifier restricts access to the class?
1. What limits a generic type?
1. What makes all properties optional?
1. What narrows union types in TypeScript?
Declaration files provide type information for JavaScript:
1. What file extension do type declarations use?