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.
Matching moments
38:46 MIN
Evaluating the strengths and limitations of TypeScript
Don't compromise on speedy delivery nor type-safety by choosing TypeScript
22:24 MIN
Why TypeScript is essential for building large applications
Building a large, complex product from the ground up with typescript & Atomic Design:lessons learned
30:50 MIN
How to convince your team to adopt TypeScript
4 Steps from JavaScript to TypeScript
25:41 MIN
Why TypeScript is like code coverage, not a security guarantee
Friend or Foe? TypeScript Security Fallacies
41:25 MIN
Q&A on type systems and legacy code
Typed Security: Preventing Vulnerabilities By Design
01:53 MIN
The common misconception of TypeScript as a security tool
Friend or Foe? TypeScript Security Fallacies
11:54 MIN
Why TypeScript is a dev-time tool, not a runtime guardrail
Friend or Foe? TypeScript Security Fallacies
04:14 MIN
Evaluating the pros and cons of TypeScript adoption
4 Steps from JavaScript to TypeScript
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
Building software that scales with Typescript
Tal Joffe
Do TypeScript without TypeScript
Simone Sanfratello
End-to-End TypeScript: Completing the Modern Development Stack
Marco Podien
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.
![Senior Software Engineer [TypeScript] (Prisma Postgres)](https://wearedevelopers.imgix.net/company/283ba9dbbab3649de02b9b49e6284fd9/cover/oKWz2s90Z218LE8pFthP.png?w=400&ar=3.55&fit=crop&crop=entropy&auto=compress,format)
Senior Software Engineer [TypeScript] (Prisma Postgres)
Prisma
Remote
Senior
Node.js
TypeScript
PostgreSQL


Frontendentwickler TypeScript / React
SAFELOG GmbH
Bremen, Germany
Remote
React
Node.js
TypeScript
Material Design

Full-Stack Software Developer TypeScript - Aerospace & Defence
Bertrandt AG
Hamburg, Germany
React
DevOps
Node.js
Angular
TypeScript
+2

Typescript Full Stack Engineer
Full Stack Typescript Engineer83zero Limited
Glasgow, United Kingdom
£45-55K
GIT
Java
REST
Azure
+16

JavaScript I TypeScript Backend Webentwickler
Soulhouse GmbH
Hamburg, Germany
€60-80K
Junior
Ionic
React
DevOps
MongoDB
+5

Frontend Entwickler TypeScript, Angular
engelhardt softwareentwicklung
Ditzingen, Germany
API
GIT
Angular
TypeScript

Softwareentwickler JavaScript / TypeScript (Cloud & SAP)
FIS Informationssysteme und Consulting GmbH
Grafenrheinfeld, Germany
Remote
API
CSS
JavaScript
TypeScript
+1

TypeScript Engineer (OOP/React/Three.js)
Materialise
Barcelona, Spain
Intermediate
Java
React
Three.js
TypeScript
Unit Testing
+1