@jvddavid/ts-events
v0.0.3
Published
A events implementation for typescript
Downloads
2
Maintainers
Readme
@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)
})