A simple strongly-typed pub/sub/fire eventing system.
Перейти к файлу
microsoft-github-policy-service[bot] 057d7ac2a6
Microsoft mandatory file (#27)
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
2023-06-12 13:09:48 -07:00
spec Migrate the repo to ESLint (#13) 2019-07-04 20:04:25 -06:00
src update dependencies. fix eslint errors (#14) 2019-07-19 10:12:32 -07:00
tsconfig update dependencies. ESLint: fix project setting to match the latest typescript-eslint changes (#15) 2019-08-15 11:04:21 -07:00
.editorconfig Add tests/Travis CI/.editorconfig. Improve README. (#1) 2018-02-18 00:55:20 -08:00
.eslintrc update dependencies. ESLint: fix project setting to match the latest typescript-eslint changes (#15) 2019-08-15 11:04:21 -07:00
.gitignore updated deps, start to use npm's package-lock feature (#9) 2018-10-04 21:43:35 -07:00
.npmignore Add .npmignore so we don't publish node_modules 2017-05-09 16:23:05 -07:00
.travis.yml Travis CI - fix node_js version (#4) 2018-05-22 21:17:58 -07:00
LICENSE Initial commit 2017-05-09 15:28:02 -07:00
README.md update dependencies (#11) 2019-01-05 10:45:35 -08:00
SECURITY.md Microsoft mandatory file (#27) 2023-06-12 13:09:48 -07:00
package-lock.json Bump ansi-regex from 4.1.0 to 4.1.1 (#24) 2022-06-21 22:49:59 -07:00
package.json Updating build packages to fix vulnerability (#16) 2019-10-30 21:10:36 -07:00
tsconfig.json Change target from es2015 to es5 (#3) 2018-05-18 15:57:27 -07:00

README.md

SubscribableEvent

GitHub license npm version Build Status npm downloads npm bundle size (minified) npm bundle size (minified + gzip)

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

Installation

npm install --save subscribableevent

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.