Typed Utilities
Type the small utilities interviews ask for, from picking keys and returning results instead of throwing to typed event emitters and branded ids.
- 01
Pick Keys from an Object, Typed
- easy
- Code
- 02
Return a Result Instead of Throwing
- easy
- Code
- 03
Handle Every Case of a Union
- easy
- Code
- 04
Check Unknown Data with a Type Guard
- easy
- Code
- 05
Cache a Function's Results, Keeping Its Types
- medium
- Code
- 06
Group a List by a Computed Key
- medium
- Code
- 07
Build a Typed Event Emitter
- medium
- Code
- 08
Freeze Nested Data, Types Included
- medium
- Code
- Pro
- 09
Build a Query String from Typed Params
- medium
- Code
- Pro
- 10
Keep Two Kinds of ID from Mixing Up
- hard
- Code
- Pro