Type assertions are TypeScript’s way of letting you override the compiler’s type inference. They’re essentially you telling the compiler: ‘I know more about this value’s type than you do, so trust…
Read more →
TypeScript’s type inference is generally excellent, but it makes assumptions that don’t always align with your intentions. When you declare a variable with let or assign a primitive value,…
Read more →
Go’s interface system provides powerful abstraction, but sometimes you need to work with the concrete type hiding behind an interface value. Type assertions are Go’s mechanism for extracting and…
Read more →