typescript.events

TypeScript Event Management

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
typescript.events
7.9.05 years ago7 years agoMinified + gzip package size for typescript.events in KB

Readme

Events
Implementation of Node.Events in Typescript for Client and Server

Example

Typescript

```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. ```javascript 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 ```