Community

Using Guard Conditions To Short-Circuit Object-Spread Operations In TypeScript 3.2.4

(Ben Nadel) After my post yesterday on applying the Object-Spread operator to Null and Undefined values in TypeScript, Duncan Bay showed me another cool feature of the Object-Spread operator: you can use guard conditions to short-circuit spread operations.