Skip to content

v2.0.0

Latest

Choose a tag to compare

@shobeiry shobeiry released this 24 Jul 18:48

Added

  • Direct access to subscriptions via indexes or custom keys without needing an extra property.
  • createSubSiphon() factory: Simplifies creating proxied instances.
  • Auto-increment add setter: Add subscriptions without manually specifying an index.
  • Support for named keys: Manage subscriptions using arbitrary string keys.
  • getOwnPropertyDescriptor support: Full descriptor support for compatibility with Object.keys, for...in, and similar methods.

Changed

  • Simplified API: Removed the extra siphon property; the returned instance itself is proxied.
  • Improved TypeScript types: Uses Record<PropertyKey, Subscription> for better index signature support and autocomplete.
  • Enhanced error logs: Clearer messages when adding non-Subscription values or attempting to override class methods.

Fixed

  • Achieved 100% test coverage, covering all Proxy traps (set, get, has, deleteProperty, ownKeys, getOwnPropertyDescriptor).
  • Fixed index handling in the add setter and ensured correct auto-increment behavior.