TypeScript Conditional Types Explained
T extends U ? X : Y, distribution over unions, and the infer keyword — the three rules that build every advanced TypeScript utility.
·8 min read · #typescript#advanced#types
4 posts.
T extends U ? X : Y, distribution over unions, and the infer keyword — the three rules that build every advanced TypeScript utility.
Build Partial, Readonly, Pick, and Record yourself with mapped types, modifier control, and key remapping — the toolkit behind every utility type.
A practical introduction to Python decorators — functions as objects, wrapping, the @ syntax, functools.wraps, a logging and timing decorator, and decorators with arguments.
A practical guide to Python iterators and generators — the iterator protocol, yield, generator expressions, memory benefits, and how to model infinite sequences.