Advanced

Level: Advanced | Labs: 15 | Prerequisites: TypeScript Practitioner

Master TypeScript at the expert level β€” type-level metaprogramming, compiler internals, functional programming, dependency injection, security patterns, and enterprise architecture.


Lab Index

#
Lab
Topic
Key Skills

01

Type metaprogramming

Conditional types, infer, template literal types, recursive types

02

String type manipulation

Template literal types, Capitalize, Uppercase, string unions

03

Advanced type utilities

DeepPartial, DeepReadonly, Flatten, UnionToIntersection, OmitNever

04

AST & compiler access

ts.createProgram, SyntaxKind, forEachChild, ts-morph

05

Compilation speed

Project references, composite, incremental, skipLibCheck, diagnostics

06

Monorepo setup

npm workspaces, tsc --build, declaration maps, path aliases

07

Runtime types

discriminatedUnion, z.lazy, z.brand, transform, error flattening

08

DI with tsyringe

@injectable, @inject, @singleton, interface tokens, mock containers

09

FP with fp-ts

Option, Either, pipe, flow, TaskEither for async

10

Type-safe GraphQL

type-graphql decorators, @ObjectType, @Resolver, custom scalars

11

Typed errors

assertNever, Result monad, error unions, neverthrow library

12

.d.ts authoring

declare module, global augmentation, overloads, namespace merging

13

Nominal typing

SQL injection prevention, Secret<T>, URL branding, validated types

14

Type-safe SQL

SQLite schema, $inferSelect, CRUD, relations, drizzle-kit

15

Full integration

Drizzle + Zod + fp-ts + tsyringe + Vitest, strict types end-to-end


Learning Path

Prerequisites

Before starting this track:

  • Complete TypeScript Practitioner (labs 01-15)

  • Comfortable with generics, decorators, async/await

  • Understanding of npm packages and module systems

Docker Verification

All labs include Docker-verified code examples:

Each lab's code is tested and confirmed working in a clean Docker environment.

Last updated