Skip to main content

The Typer

A Learning TypeScript > Objects 🍲 entree project.


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?


If you haven't yet, set up the repository locally.

git clone learning-typescript-projects
cd learning-typescript-projects
npm i

Change your terminal directory to this project's:

cd projects/objects/the-typer

In your terminal, run the TypeScript compiler via the tsc script. For example, to start the TypeScript compiler in watch mode:

npm run tsc -- --watch
npm run tsc -- --watch


In ./index.ts, add TypeScript type annotations to get TypeScript to compile without type errors.


  • Don't use any or leave any implicit anys.
  • 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.