Hidash
A Learning TypeScript > Generics 🥗 appetizer project. You'll practice using generics to write data-agnostic utility functions.
Zap! Bang! Fizz!
Welcome, traveler, to the mystical world of... 2010! But it's not the 2010 you're thinking of. You've entered a parallel universe eerily similar to yours but for two key differences:
- Lodash was never released
- TypeScript was released much earlier, in the early 2000s
Your task is to create several Lodash-like useful array and object functions in TypeScript. They will need to use generic type arguments for proper typings.
Welcome to the TypeScript Zone.
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 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
shell
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
shell
Note: your terminal should be in the
hidashdirectory, not the root repository's directory.
Steps
Notes
- Don't import code from one step into another.
- Each function you write will need to use generic type arguments to be properly typed.