TypeScript Stories
@typescripts
61
subscribers
40
links
Download Telegram
Join
TypeScript Stories
61 subscribers
TypeScript Stories
3️⃣
6️⃣
❌
Wrong type inference for
number
comparing to literals.
▶️
Playground
TypeScript Stories
3️⃣
7️⃣
❌
Wrong union assignment.
▶️
Playground
TypeScript Stories
3️⃣
8️⃣
❌
Type guard narrowing type loss after reassignment.
▶️
Playground
👎
1
TypeScript Stories
3️⃣
9️⃣
❌
Dangerous usage of spread operator.
▶️
Playground
TypeScript Stories
4️⃣
0️⃣
❌
Incorrect type narrowing for
let value: <union type> = ...
▶️
Playground
▶️
More real-world example and solution