The Typer
A Learning TypeScript > Objects 🍲 entree project.
Hmmph.
Last of your kind. A wandering soul -- not lost, but never found. Your keen instincts for type safety and sound type systems are a dim light in the dark and dismal world around you. You are The Typer.
An old friend of yours recently gave you a map purporting to include a rare and desirable treasure. The map is missing TypeScript type annotations, but otherwise seems acceptable.
Can you fill out type annotations to make the map more usable?
Setup
If you haven't yet, set up the github.com/LearningTypeScript/projects repository locally.
shell
shell
Open your editor in this project's directory:
shell
shell
In your terminal, run the TypeScript compiler via the tsc script.
For example, to start the TypeScript compiler in watch mode:
shell
shell
Specification
In ./index.ts, add TypeScript type annotations to get TypeScript to compile without type errors.
Notes
Note: your terminal should be in the
the-typerdirectory, not the root repository's directory.
- Don't use anyor leave any implicitanys.
- Don't use any arrays or functions, as they haven't been covered in Learning TypeScript yet.
- Don't change any runtime code -- it's fine as-is.