TypeScript: final assessment
This covers the whole course. Take it after the last module.
Final quiz
Practical assessment: Type an untyped program
Without using hints, take a JavaScript program of about 200 lines that reads orders from JSON and prints invoices, and convert it to strict TypeScript.
- Describe the input data with interfaces and parse it from unknown with type guards
- Model order states as a discriminated union and handle every state exhaustively
- Replace repeated helper code with generic functions
- Report invalid input with a Result instead of crashing
- Compile in strict mode with no any
Final project
A typed task manager: Write a command-line task manager in TypeScript whose types make it impossible to put a task into an invalid state, with every command parsed from text into a typed command before it runs.
How it is evaluated
- Correctness: the program compiles in strict mode and produces the same invoices for valid input
- Safety: invalid input is reported clearly and no state can be invalid
- Design: types are derived from one source with utility types instead of copied
- Clarity: every type assertion is justified by a check next to it
To complete this course
- Score at least 70% on the final quiz
- Solve the beginner and intermediate exercises in every lesson
- Finish the final project and check it against the evaluation criteria