TypeScript Stories
60 subscribers
40 links
Download Telegram
1️⃣4️⃣
Strange default parameter type behavior.

▶️ Playground
1️⃣5️⃣
🤨 Mysterious undefined appearance.

▶️ Playground
1️⃣6️⃣
Dynamic destructuring of function parameter is not allowed.

▶️ Playground
1️⃣7️⃣
😢 Wrong optional chaining type narrowing in if statement.

▶️ Playground
1️⃣8️⃣
Using variable before assignment is not forbidden.

▶️ Playground
1️⃣9️⃣
Wrong type inference of union with object.

▶️ Playground
2️⃣0️⃣
😢 No type narrowing with unions via typeof operator.

▶️ Playground
2️⃣1️⃣
🤔 Types 'asd' | string and 123 & number.

▶️ Playground
2️⃣2️⃣
Null-porotype object still has prototype types.

▶️ Playground
2️⃣3️⃣
Wrong behavior with array type intersections.

▶️ Playground
2️⃣4️⃣
Strange behavior with union of arrays.

▶️ Playground
2️⃣5️⃣
Weirdness with void type.

▶️ Playground
2️⃣6️⃣
Weirdness of Record type.

▶️ Playground
2️⃣7️⃣
No error when no overlapping with null or undefined?

▶️ Playground
2️⃣8️⃣
No error when destructuring non-existent element with default value?

▶️ Playground
2️⃣9️⃣
🤔 Destructuring from never[] is of type undefined.

▶️ Playground
3️⃣0️⃣
Assign non-nullable type {} to non-primitive object.

▶️ Playground
3️⃣1️⃣
Incrementing literal type in for loop.

▶️ Playground
3️⃣2️⃣
Wrong type inference with Capitalize and Uncapitalize utility types.

▶️ Playground
3️⃣3️⃣
Something wrong with type inference or Promise.then typings.

▶️ Playground
Solution
3️⃣4️⃣
Weird incorrect autocompletion.

▶️ Playground