Skip to main content

Various Lawyerings

A Learning TypeScript > Objects 🥗 appetizer project. You'll practice using aliased object types to represent shapes of data.

Hello, fellow lawyer. I'm glad you've chosen to join me in preparing to engage in legal battle. As you can see, I require your assistance in developing TypeScript projects to manage my files for this most important case.

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/objects/various-lawyerings
shell
code projects/objects/various-lawyerings

In your 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-aviary-classification --watch
shell
npm run tsc -- --project 01-aviary-classification --watch

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

Steps

Notes

  • Don't import code from one step into another.
  • Use object types (type), not interfaces (interface)