Instructions
1. Define query and command type aliases
type GetPricesQuery<'a> = Query<SKU, Prices, 'a>
type GetSalesQuery<'a> = Query<SKU, Sale list, 'a>
type GetStockEventsQuery<'a> = Query<SKU, StockEvent list, 'a>
type SavePricesCommand<'a> = Command<Prices, 'a>
type SaveProductCommand<'a> = Command<Product, 'a>2. Define the discriminated union for all instructions
3. Define the effect interface for this union
4. Define the effect class for each instruction
5. Define helper functions for each effect
Diagram
Final thoughts
Last updated
