Rettime is a small TypeScript library that combines browser-style `EventTarget` behavior with Node-style `EventEmitter`, adding event cancellation and type safety. It’s useful for building event-based systems where you want strongly typed event names and payloads, plus convenience helpers like `.emitAsPromise()` and `.emitAsGenerator()`.
Project status
- Actively maintained, with very recent updates (v0.11.12 on 2026-09-25, and the previous series of patch updates on 2026-05-03 and 2026-03-12).
- Update cadence appears patch-driven, with multiple small updates clustered in March 2026, another cluster in May 2026, then a later update in September 2026 (about a 4 to 5 month gap), followed by another update within a week of that September push.
AI summary generated
Recent updates
v0.11.12
v0.11.12 is a small patch release with a targeted runtime compatibility bug fix around constructing MessageEvent. The code change ensures a non-undefined initializer is always passed to the MessageEvent constructor, matching the single documented release note.
v0.11.11
v0.11.11 is a small patch release focused on correcting duplicate handling in LensList and listener removal behavior. The documented change mentions keeping LensList internal stores synchronized when deleting duplicates, and the code diff shows additional listener iteration behavior changes not called out in the release notes.
v0.11.10
v0.11.10 improves the Emitter.hooks and listener registration behavior around AbortSignal, preventing indefinite registrations when the signal is already aborted. It also hardens hook invocation by iterating over snapshots so that removing other hooks during hook execution does not cause later hooks to be skipped.
v0.11.9
v0.11.9 changes the internal Emitter removal logic so that the `removeListener` hook is emitted when `removeAllListeners()` removes listeners. The implementation now centralizes removal behavior through `removeListener`, and updates related cleanup behavior for listeners registered with abort signals.
v0.11.8
v0.11.8 fixes an issue related to listener cleanup, and also addresses a behavioral bug around `.earlyOn` interactions with listener propagation. The implementation changes focus on correctly unsubscribing `AbortSignal` abort handlers to prevent leaked subscriptions and avoid unintended re-triggering during listener removal.
v0.11.7
v0.11.7 introduces hook enhancements around event emission. It adds a new hooks.beforeEmit hook and a persist option intended to keep hook handlers active across emitter.removeAllListeners().
Featuresv0.11.6
v0.11.6 adds support for passing listener options to hooks, specifically enabling hook removal when an AbortSignal is aborted. The implementation also introduces a once-like behavior for hook callbacks when options.once is provided.
Featuresv0.11.5
v0.11.5 introduces a new Emitter hook named removeListener. The implementation wires this hook into both explicit listener removal and automatic removal paths (for once listeners).
Featuresv0.11.4
v0.11.4 is a small release with release notes that only mention “various performance improvements”. The code diff shows changes inside the Emitter implementation (listener tracking and event.stopPropagation interception), plus a dev dependency update to @rolldown/binding-darwin-arm64.
v0.11.3
v0.11.3 contains a targeted bug fix focused on improving lookup performance inside `LensList`. The release notes specifically claim a reduction in lookup cost to O(1).
v0.11.2
v0.11.2 introduces a new Emitter hook, `newListener`, intended to let consumers observe when listeners are added. The release notes only mention the hook addition, but the implementation adds a new public `emitter.hooks` API and specifies exact callback timing and argument shapes in code.
Features