After this lesson, you will be able to: Design and publish a fully type-inferred TypeScript library where the type system does the work: generics, conditional and mapped types, and a public API that needs zero manual annotations from consumers.
Passion project per Curriculum-Upgrade.md. The TS differentiator is type-level design. Build something where a consumer gets perfect autocomplete and red squiggles without writing a single type themselves.
Options: a typed event emitter (event names + payloads inferred), a typed config/schema validator, a typed query/filter builder, or a typed state machine. The types are the product.
M1: scaffold TS strict + tsup for dual ESM/CJS + `.d.ts` emit. Turn on `exactOptionalPropertyTypes` and `noUncheckedIndexedAccess`.
M2: design the public type signatures FIRST. Write the consumer call site you wish existed, then make the types satisfy it.
M3: implement with generics + conditional/mapped types so return types narrow from inputs (no `as` casts in the public API).
M4: write type-level tests with `expectTypeOf` (Vitest) or `tsd` asserting inference works and bad calls fail to compile.
M5: runtime tests with Vitest for the actual behaviour.
M6: README with a usage example that visibly shows inference (a screenshot of autocomplete helps). JSDoc every export.
M7: `npm publish` with a correct `types` export. Tag v0.1.0. Solve 5 Type Challenges and link the solutions in the README.
Leaking `any` or `as` casts into the public API. Consumers feel it immediately. No type-level tests, so a refactor silently breaks inference. Over-engineering the types into something unreadable. Senior TS is also about restraint. Shipping without `exactOptionalPropertyTypes` / strict, then claiming 'strict TS' on the resume.
Sign in and purchase access to unlock this lesson.