Types
Learn TypeScript, a superset of JavaScript that adds types to make the language scale!
StartKey Concepts
Review core concepts you need to learn to master this subject
TypeScript
Primitive Types
TypeScript Type Inference
The Shape of an Object
Typescript any
TypeScript Supports Type Annotations
TypeScript
TypeScript
The TypeScript programming language is a superset of JavaScript that adds types to JavaScript using a set of tools called a type system.
- 1Invented in 1995, JavaScript was designed as a small scripting language for simple web pages in browsers. It wasn’t until 1999 that JavaScript was capable of supporting the kinds of dynamic web pag…
- 2So now that we know why TypeScript exists, let’s talk about how we use it: + First, we write TypeScript code in files with the extension .ts. + Next, we run our code through the TypeScript […
- 3JavaScript allows us to assign any value to any variable. That makes it very flexible to use, which can be good for getting started quickly in coding. In practice, variables that are assigned value…
- 4Because TypeScript knows what types our objects are, it also knows what shapes our objects adhere to. An object’s shape describes, among other things, what properties and methods it does or do…
- 6In some situations, we’d like to declare a variable without an initial value while still ensuring that it will only ever be assigned values of a certain type. If left as any, TypeScript won’t be ab…
What you'll create
Portfolio projects that showcase your new skills
Restaurant Recommender
In this TypeScript project, you'll fix several bugs using the errors surfaced by TypeScript and add a new feature to the program. Hungry customers will be nomming in no time.
TypeMart
In this project, you'll use TypeScript to create the underlying logic for TypeMart—the coolest new online shop in the game.
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory