← Back to archive

Stdle #149 · narrowing · 2026-11-02

What does this TypeScript snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

class MyErr extends Error {}
const e: Error = new MyErr()
console.log(e instanceof Error)
Narrowing
4 attempts left

Answer & explanation