Michael Hladky & Stefan Baumgartner
The Art and Craft of Type Development
#1about 6 minutes
The challenge of typing deeply nested object properties
Manually creating function overloads for each level of object nesting is not a scalable or dynamic solution for property selection.
#2about 9 minutes
Setting up a playground for advanced type development
Isolate type development by using the TypeScript playground, a sample data object, and a declared function to focus solely on type signatures.
#3about 13 minutes
Recursively generating a union type for nested keys
Build a recursive helper type using string literals and conditional types to generate a union of all possible dot-notation paths for a nested object.
#4about 8 minutes
Inferring the return type from a string path
Use a recursive conditional type with the `infer` keyword to parse a dot-notation string and correctly determine the type of the selected nested property.
#5about 6 minutes
Recapping the workflow and current TypeScript limitations
The development process involves isolating the problem, using helper types, and understanding current limitations like variadic tuple types for dynamic argument lists.
Related jobs
Jobs that call for the skills explored in this talk.
Featured Partners
Related Videos
Vuejs and TypeScript- Working Together like Peanut Butter and Jelly
Rob Richardson
Lies we Tell Ourselves As Developers
Stefan Baumgartner
Advanced Typing in TypeScript
Lars Hupel
Hello generics, goodbye boilerplate!
Miroslav Jonaš
Typescript, React and Atomic Design - a match made in heaven
Nathalia Rus
All you need is types
Tal Joffe
Where we're going we don't need JavaScript - Programming with Type Annotations
Peter Kröner
Front-End Micro Apps
Serg Hospodarets
From learning to earning
Jobs that call for the skills explored in this talk.
Fullstack TypeScript Developer (m/f/d) - Angular / Node.js (remote)
PDR.cloud GmbH
Schönefeld, Germany
Remote
Intermediate
CSS
RxJS
REST
Azure
+12
Senior Fullstack Developer (Typescript, Angular, Nest.js) (m/f/x)
Navigating Art
Berlin, Germany
Senior
CSS
GIT
RxJS
SASS
REST
+6

