7.9.0 • Published 7 years ago

typescript.events v7.9.0

Weekly downloads
269
License
MIT
Repository
github
Last release
7 years ago

Events

Implementation of Node.Events in Typescript for Client and Server

Example

Typescript

import {Event} from "typescript.events";

class MyEmitter extends Event {}

let myEmitter = new MyEmitter();
myEmitter.on('event', () => {
   console.log('event occured') 
});

myEmitter.emit('event');

Javascript

When performing in browser testing with NPM copy, paste and run below example.

var Event = require("typescript.events").Event;

class MyEmitter extends Event {};

let myEmitter = new MyEmitter();
myEmitter.on('event', () => {
   console.log('event occured') 
});

myEmitter.emit('event');

Refer to Node Documentation for additional information

IntelliSense Exeperience

Alt Text

Installation

npm install typescript.events

Development

Prepare environment

git clone https://github.com/FlippieCoetser/Events
cd Events
npm install
npm link

Lint code

npm run lint

Build code

npm run build

Test code

npm test

Coverage report

npm run report

Package code

npm run package
7.9.0

7 years ago

7.8.0

7 years ago

7.7.0

7 years ago

7.6.0

7 years ago

7.5.0

7 years ago

7.4.0

7 years ago

7.3.0

7 years ago

7.1.0

7 years ago

7.0.0

7 years ago

6.0.0

8 years ago

5.0.0

8 years ago

4.0.0

8 years ago

3.0.0

8 years ago

1.0.0

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.1-0

8 years ago