TypeScript Stories
61 subscribers
40 links
Download Telegram
3️⃣6️⃣
Wrong type inference for number comparing to literals.

▶️ Playground
3️⃣7️⃣
Wrong union assignment.

▶️ Playground
3️⃣8️⃣
Type guard narrowing type loss after reassignment.

▶️ Playground
👎1
3️⃣9️⃣
Dangerous usage of spread operator.

▶️ Playground
4️⃣0️⃣
Incorrect type narrowing for
let value: <union type> = ...


▶️ Playground
▶️ More real-world example and solution