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.

Angular Developer

Picnic Technologies B.V.
Amsterdam, Netherlands

Intermediate
Senior

Featured Partners

Related Articles

View all articles
DC
Daniel Cranney
Exploring TypeScript: Benefits for Large-Scale JavaScript Projects
JavaScript is the backbone of web development, powering everything from small websites to large-scale enterprise applications. However, as projects grow in complexity, maintaining JavaScript code can become increasingly difficult. This is where TypeS...
Exploring TypeScript: Benefits for Large-Scale JavaScript Projects
DC
Daniel Cranney
Dev Digest 159: AI Pipelines, 10x Faster TypeScript, How to Interview
Inside last week’s Dev Digest 159 . 🤖 How to use LLMs to help you write code ⚡ How much electricity does AI need? 🔒 Is your API secure? Learn all about hardening it… 🟦 TypeScript switches to go and gets 10 times faster 🖼️ An image cropper in your ap...
Dev Digest 159: AI Pipelines, 10x Faster TypeScript, How to Interview
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?

From learning to earning

Jobs that call for the skills explored in this talk.

Typescript Developer

Typescript Developer

Dabster
Charing Cross, United Kingdom

Java
Docker
JavaScript
TypeScript
Microservices
+1