Lars Hupel

Advanced Typing in TypeScript

What if your types could track data transformations at compile time? Learn the advanced TypeScript patterns that make rock-solid, dynamic APIs possible.

Advanced Typing in TypeScript
#1about 4 minutes

Understanding the core design principles of TypeScript

TypeScript's design is based on core tenets like structural typing, powerful type inference, and support for common JavaScript patterns.

#2about 6 minutes

A practical example of typing the DOM API

The `addEventListener` method is typed using string literal types, the `keyof` operator, and an event map interface to provide type safety for different event types.

#3about 5 minutes

Designing a type-safe data pipeline inspired by Pandas

A type-safe data processing API can be designed to overcome the runtime errors common in libraries like Pandas by tracking the shape of data frames.

#4about 4 minutes

Using generic record types for table columns

The `Table` interface uses a generic type parameter constrained to `Record<string, any>` to represent named columns with specific types.

#5about 7 minutes

Implementing and demonstrating the data pipeline API

A live demo showcases the API's type inference capabilities for selecting, computing, and dropping columns from a table without explicit type annotations.

#6about 3 minutes

Answering questions on partial types and inference

The Q&A covers handling partial objects in constructors and demonstrates how TypeScript correctly infers the types of newly computed columns.

Related jobs
Jobs that call for the skills explored in this talk.

test

Milly
Vienna, Austria

Intermediate

test

Milly
Vienna, Austria

Intermediate

Featured Partners

Related Articles

View all articles
TL
Thomas Limbüchler
What is TypeScript?
Since Angular 2 at the latest, TypeScript has been known to many. But what exactly can you do with it, and is it worth changing?Anyone who has worked with programming languages ​​such as Java or C# before will have noticed that JavaScript allows a su...
What is TypeScript?
CH
Chris Heilmann
All the videos of Halfstack London 2024!
Last month was Halfstack London, a conference about the web, JavaScript and half a dozen other things. We were there to deliver a talk, but also to record all the sessions and we're happy to share them with you. It took a bit as we had to wait for th...
All the videos of Halfstack London 2024!
BB
Benedikt Bischof
How we Build The Software of Tomorrow
Welcome to this issue of the WeAreDevelopers Live Talk series. This article recaps an interesting talk by Thomas Dohmke who introduced us to the future of AI – coding.This is how Thomas describes himself:I am the CEO of GitHub and drive the company’s...
How we Build The Software of Tomorrow

From learning to earning

Jobs that call for the skills explored in this talk.