publisher

Installation
SKILL.md

Publisher

Installation: If not already installed, add the package with pnpm add @efesto-cloud/publisher.

Use this skill when you need event broadcasting without stored state.

Quick Rule

  • Publisher: emit events with notify(...) to current subscribers.
  • No state: if you need get/set, use Observable instead.

Procedure

  1. Create new Publisher<Args>() with typed tuple args.
  2. Register listeners with subscribe(...) and keep the cleanup function.
  3. Emit events via notify(...) and cleanup with returned unsubscribe or unsubscribeAll().

Common Mistakes

  • Using Publisher as a state container.
  • Ignoring returned unsubscribe function.
  • Emitting args that do not match the tuple type.
Related skills
Installs
3
First Seen
14 days ago