Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Build a small reusable library (a typed event emitter, a Result type with helpers, a typed API client, or a small state container) that uses generics and constraints for type safety. Ship it with declaration files, full typing of its public API, and tests that verify both behavior and that misuse is a compile error.
Generics + constraints used correctly; types preserved through the API; no any leaks.
A clean, fully-typed public API; declaration files emitted; consumers get autocomplete and errors on misuse.
Misuse (wrong types) is a compile error; discriminated unions / utility types used where they fit.
Behavior tested; ideally type-level expectations too.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# A type-safe reusable library with generics ## Goal Build a small reusable library (a typed event emitter, a Result type with helpers, a typed API client, or a small state container) that uses generics and constraints for type safety. Ship it with declaration files, full typing of its public API, and tests that verify both behavior and that misuse is a compile error. ## Acceptance criteria - [ ] Generic design: Generics + constraints used correctly; types preserved through the API; no any leaks. - [ ] Public types: A clean, fully-typed public API; declaration files emitted; consumers get autocomplete and errors on misuse. - [ ] Type-level correctness: Misuse (wrong types) is a compile error; discriminated unions / utility types used where they fit. - [ ] Tests: Behavior tested; ideally type-level expectations too. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.