Skip to content

D · Declarations & packaging

Relay depends on an untyped library and ships a typed client SDK. You learn to read, write and publish .d.ts files, and to learn a library’s API from its declarations.

# Lesson
1 The ambient world: declare, declare global, lib, types
2 Typing an untyped JS library; wildcard modules
3 Augmenting third-party types
4 Publishing: exports with types, declaration emit, isolatedDeclarations
5 Reading real .d.ts files from published libraries

Some exercises run in the browser; others need real Bun or real files and run in your own project with bun test. Each lesson says which.