TypeScript
Write functional TypeScript with declared functions, immutable values, typed Results, and exhaustive matching. Covers module layout, naming, types, state, composition, JSDoc, and behavioral tests.
Conditionals
Exit invalid paths with guards and handle closed variants through exhaustive matching.Errors
Carry failure as a typed Result, contain third-party exceptions, and classify failures without text matching.File structure
Assign modules to their owning capability and keep package entrypoints deliberate and shallow.Functional TypeScript
Use immutable values, declared functions, factories, typed Results, and exhaustive matching. Apply this pack to TypeScript source and examples.Functions
Make operations findable with declarations, explicit contracts, named inputs, and a single responsibility.JSDoc
Explain call-site behavior in multiline JSDoc, demonstrate public usage, and identify private declarations.Naming
Name concrete operations and domain values, with casing that stays predictable across platforms.Paradigm
Build behavior from immutable functions, inject resources through factories, and isolate effects in adapters.State
Produce new values for state changes and keep mutable resource handles separate from installation data.Testing
Prove observable contracts with real local files and processes, reserving test doubles for external services.Types
Validate external values, retain readonly contracts, and represent source variants with discriminated unions.Utilities
Use the existing utility vocabulary and make pipeline stages and I/O concurrency explicit.