Skip to main content

Typearium

A Learning TypeScript > Using IDE Features 🥗 appetizer project. You'll practice using refactors provided by TypeScript in your IDE.

Welcome to the Typearium: a combination aquarium/terrarium/vivarium that keeps animals in the form of TypeScript types. We're quite niche.

Because we're so niche, we haven't had the budget to invest in updating our (somewhat legacy) code. It's a good thing we originally wrote it in TypeScript, because we're hoping you can use IDE features powered by TypeScript to help with some refactors!

Setup

If you haven't yet, set up the github.com/LearningTypeScript/projects repository locally.

shell
git clone https://github.com/LearningTypeScript/projects learning-typescript-projects
cd learning-typescript-projects
npm i
shell
git clone https://github.com/LearningTypeScript/projects learning-typescript-projects
cd learning-typescript-projects
npm i

Open your editor in this project's directory:

shell
code projects/using-ide-features/typearium
shell
code projects/using-ide-features/typearium

In one terminal, run the TypeScript compiler via the tsc script within whichever step you're working on. For example, to start the TypeScript compiler on the first step in watch mode:

shell
npm run tsc -- --project 01-favorite-animals --watch
shell
npm run tsc -- --project 01-favorite-animals --watch

In another terminal, run Jest via the test script on whichever step you're working on. For example, to start tests for the first step in watch mode:

shell
npm run test -- 1 --watch
shell
npm run test -- 1 --watch

Note: your terminal should be in the typearium directory, not the root repository's directory.

Steps

Notes

  • Remember, this is meant to exercise your IDE refactoring skills.
  • Don't import code from one step into another.