errore Go-style error handling for TypeScript. Functions return errors instead of throwing them — but instead of Go's two-value tuple ( ), you return a single union. Instead of checking , you check . TypeScript narrows the type automatically. No wrapper types, no Result monads, just unions and . Rules 1. Always — namespace import, never destructure 2. Never throw for expected failures — return errors as values 3. Never return — the union collapses to , breaks narrowing. Common trap: returns , so makes the return type → . Fix: cast with → 4. Avoid for control flow — use for async boundaries, f…