Stefan Baumgartner
Lies we Tell Ourselves As Developers
#1about 2 minutes
The hidden dangers in everyday TypeScript code
A seemingly simple code snippet that passes type checks can still be riddled with runtime errors that TypeScript is supposed to prevent.
#2about 2 minutes
Why network requests returning `any` breaks type safety
The `any` type returned by default from I/O operations like `fetch` allows unsafe assignments, which can be mitigated by patching interfaces to return `unknown`.
#3about 2 minutes
Handling errors safely with the `unknown` type
Since anything can be thrown in JavaScript, catch block errors are typed as `any`, but using `unknown` and `instanceof` checks provides a safer way to handle them.
#4about 2 minutes
The disconnect between function overloads and implementation
Function overloads define a public API but do not enforce that the implementation correctly returns the specified types for each overload signature.
#5about 1 minute
Using conditional types to enforce return types
Conditional types can replace function overloads to create a more complex type signature that forces the developer to correctly handle different return paths.
#6about 3 minutes
How mutability breaks TypeScript's type tracking
TypeScript does not track type changes that occur from mutable operations like `array.push`, leading to a disconnect between the static type and the runtime value.
#7about 5 minutes
The trade-offs and lies within the solutions
Each proposed solution, from declaration merging to generics, introduces its own set of new problems and potential bugs.
#8about 3 minutes
Understanding TypeScript's core design philosophy
TypeScript intentionally prioritizes developer productivity over a provably sound type system, requiring developers to understand and manage these trade-offs.
#9about 3 minutes
The developer's role is to make conscious decisions
Software engineering is about making informed decisions and choosing the right tools and patterns for your team, rather than following dogmatic advice.
#10about 6 minutes
Q&A on Rust, `instanceof` alternatives, and `ts-reset`
The speaker answers audience questions about his favorite language (Rust), using Zod for runtime type checking instead of `instanceof`, and the trade-offs of using `ts-reset`.
Related jobs
Jobs that call for the skills explored in this talk.
Hubert Burda Media
München, Germany
€80-95K
Intermediate
Senior
JavaScript
Node.js
+1
MARKT-PILOT GmbH
Stuttgart, Germany
Remote
€75-90K
Senior
Java
TypeScript
+1
Matching moments
02:49 MIN
Using AI to overcome challenges in systems programming
AI in the Open and in Browsers - Tarek Ziadé
02:33 MIN
Why you might not need JavaScript for everything
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
11:32 MIN
The industry's focus on frameworks over web fundamentals
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
03:58 MIN
Making accessibility tooling actionable and encouraging
Developer Time Is Valuable - Use the Right Tools - Kilian Valkhof
03:31 MIN
The value of progressive enhancement and semantic HTML
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
02:48 MIN
Building trust through honest developer advocacy
Devs vs. Marketers, COBOL and Copilot, Make Live Coding Easy and more - The Best of LIVE 2025 - Part 3
09:00 MIN
Navigating the growing complexity of modern CSS
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
11:10 MIN
The only frontend stack that truly matters
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
Featured Partners
Related Videos
Don't compromise on speedy delivery nor type-safety by choosing TypeScript
Jens Claes
Friend or Foe? TypeScript Security Fallacies
Liran Tal
Typed Security: Preventing Vulnerabilities By Design
Michael Koppmann
Advanced Typing in TypeScript
Lars Hupel
Where we're going we don't need JavaScript - Programming with Type Annotations
Peter Kröner
Do TypeScript without TypeScript
Simone Sanfratello
End-to-End TypeScript: Completing the Modern Development Stack
Marco Podien
All you need is types
Tal Joffe
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

Confideck GmbH
Vienna, Austria
Remote
Intermediate
Senior
Node.js
MongoDB
TypeScript

Visonum GmbH
Remote
Junior
Intermediate
React
Redux
TypeScript

engelhardt softwareentwicklung GmbH
Ditzingen, Germany
Remote
CSS
GIT
HTML
Java
+10

engelhardt softwareentwicklung
Ditzingen, Germany
API
GIT
Angular
TypeScript


Rithum
Remote
Intermediate
API
GIT
Azure
NoSQL
+19

Epam Systems, Inc.
Zürich, Switzerland
Selenium
Cucumber
TypeScript
Tricentis Tosca Testsuite

AOK Systems GmbH
Hamburg, Germany
C++
JavaScript
TypeScript
Microservices
Amazon Web Services (AWS)
