View the Frontend Masters workshop for Enterprise-Scale TypeScript v2 here

Enterprise-Scale TypeScript v2

Learn how to manage large TypeScript code bases with confidence and ease. In this course, Mike shares his knowledge from years of experience working with teams who maintain TypeScript projects with hundreds of regular full-time contributors and 100K+ lines of code.

01Intro & Project Setup

This course tackles challenges in large-scale enterprise software, emphasizing productivity, cohesion, longevity, and complexity for TypeScript developers.

02TypeScript Libraries - Zero to One

We'll code together to create a new library from scratch, and incrementally add build tools, linting, testing and even automatic API documentation

03tsconfig strictness

We'll look closely at the tsconfig we created for our library, examining a variety of the compiler options we enabled

04App vs Library Concerns

A discussion of different concerns to optimize for, depending on whether you're building a library or an app

05Converting to TypeScript

Converting to TypeScript: Integrate TypeScript into your build, rename files to .ts, and incrementally enforce stricter types. Progressively refine type information, enhance function and class types, and reduce usage of any. Aim for methodical, incremental changes, backed by tests.

06Steps 1, 2 and 3 - Adding our first types

We'll tackle steps 1, 2 and 3 in the TypeScript conversion process, by integrating TypeScript into our build tools, renaming our files to .ts, and getting rid of any implicit any types. We'll use this as an opportunity to learn how this kind of change can be made in many small PRs over a long period of time, as is common in large projects.

07Declaration Files

TypeScript's .d.ts declaration files, overlay type info on JS files. DefinitelyTyped, a community-driven repository, hosts over 6,000 type declarations. Challenges arise with versioning, but tools like Yarn's TypeScript Plugin ease the process.

08Step 4 - Dealing with Pure Type Information

We'll tackle step 4, and begin doing some domain modelling, and defining type information for things that are important to a slack app: user, team, channel and message

10Types At Runtime

We'll add some type guards to our project, and use them as the all-important "glue" joining compile-time type-checking and runtime behavior

11Local Packages

We'll learn about yarn workspaces, and how they provide an opportunity for simple but effective modular architecture in a large TypeScript projects.

12Tests for Types

We'll look closely at how we can write tests for type information, including negative test cases for things we want to ensure do not compile.

© 2023 All Rights Reserved.