Pattern matching with infer isn’t just for Promises and Objects. You can deconstruct Tuples and Arrays element by element in Type Space, mirroring the exact syntax of JavaScript’s array destructuring and spread operators.
Learn how the built-in Awaited<T> utility models the runtime await keyword. We explore how to combine the infer keyword with Recursive Type Aliases to drill down and unwrap Promises infinitely deep, and how to compose it with ReturnType for async functions.
If conditional types are the if-else statements of Type Space, the infer keyword is the variable declaration (let x = ...). Learn how to extract types dynamically via pattern matching, rebuild ReturnType, and parse Template Literal Strings at compile time.
Sometimes, you want a conditional type to evaluate an entire Union as a single monolithic entity, rather than mapping over its individual members. Learn how wrapping generic parameters in brackets [T] prevents distribution, and how to use this mechanic to build complex IsUnion checks.
When you pass a Union type into a conditional type, TypeScript doesn’t evaluate the union as a whole. It evaluates every single member of the union separately, and combines the results. Learn how this powerful (and sometimes confusing) mechanism powers TypeScript’s standard library.
Conditional types are the if-else statements of Type Space. Learn how to use the ’extends ? :’ syntax to compute dynamic types based on assignability logic, replace complex function overloads, and construct nested else-if type chains.
Running ’terraform plan’ is not enough to guarantee your infrastructure works. In this final episode, we bridge the gap between DevOps and Software Engineering by writing automated Golang tests using Terratest. We will programmatically provision infrastructure, assert its correctness, and tear it down.
As your Terraform codebase scales across dozens of microservices and environments, you will find yourself copy-pasting the same ‘backend’ and ‘provider’ blocks repeatedly. Terragrunt is a powerful wrapper that eliminates this repetition, allowing you to define global configurations once.
Refactoring HCL code is dangerous. If you rename a resource block, Terraform will attempt to destroy the old resource and recreate it. In this episode, we learn how to use ‘moved’ blocks and the state CLI to refactor code safely, preventing catastrophic database deletions.