Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 396 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 396 Bytes

@jvddavid/ts-events

This is a module where I added the EventMap type to the events library

Install

npm install @jvddavid/ts-events

Example

import { EventEmitter } from '@jvddavid/ts-events'

type TestEventMap = {
  test: [message: string]
}

const emitter = new EventEmitter<TestEventMap>()

emitter.on('test', (message) => {
  console.log(message)
})