Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

subscribableevent

Microsoft8.4kMIT1.0.1TypeScript support: included

A simple strongly-typed pub/sub/fire eventing system

TypeScript, Eventing, Subscribable, subscribe, publish, publish/subscribe, pub/sub, eventemitter

readme

SubscribableEvent

GitHub license npm version Build Status David David

A simple strongly-typed pub/sub/fire eventing system

Basic Example

const event = new SubscribableEvent<(payload: string) => void>(); 

event.subscribe((payload: string) => {
    console.log(payload);
});

event.fire('Payload Params');

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.