Problem: You have complex logic for narrowing a TypeScript type that you'd...
Problem: You have complex logic for narrowing a TypeScript type that you'd like to reuse in a few spots.
Solution: Consider an assertion function.
20% off the full course here: https://dometrain.com/course/deep-dive-typescript/?coupon_code=TYPESCRIPT20