Classes and Patterns
Type classes and patterns: generic stacks and caches, observables, commands, plugins, builders and dependency injection.
- 01
Write a Generic Stack Class
- easy
- Code
- 02
Write a Typed Observable Subject
- easy
- Code
- 03
Share Behaviour Through an Abstract Class
- easy
- Code
- 04
Guard a Balance with a Private Field
- easy
- Code
- 05
Make a Class Iterable with Symbol.iterator
- easy
- Code
- 06
Build a Typed LRU Cache Class
- medium
- Code
- 07
Expire Cache Entries with an Injected Clock
- medium
- Code
- 08
Write a Priority Queue Class with a Comparator
- medium
- Code
- 09
Run and Undo Typed Commands
- medium
- Code
- 10
Chain Results with Ok and Err Classes
- medium
- Code
- 11
Look Up Plugins by Name, Fully Typed
- medium
- Code
- 12
Subscribe to a Typed Slice of a Store
- medium
- Code
- Pro
- 13
Make a Builder That Can't Build Too Early
- hard
- Code
- Pro
- 14
Resolve Typed Services from a DI Container
- hard
- Code
- Pro
- 15
Type a State Machine Class from Its Table
- hard
- Code
- Pro