TypeScript Basics
Your first types, one idea at a time: annotations, object types, optional parameters, literal unions, arrays and a first generic.
- 01
Add Types to a Function's Parameters
- easy
- Code
- 02
Describe an Object with a Type
- easy
- Code
- 03
Make a Parameter Optional
- easy
- Code
- 04
Accept Only a Few Exact Strings
- easy
- Code
- 05
Type an Array of Numbers
- easy
- Code
- 06
Allow Two Kinds of Value
- easy
- Code
- 07
Return a Value or Nothing
- easy
- Code
- 08
Write Your First Generic Function
- easy
- Code