This is a module where I added the EventMap type to the events library
npm install @jvddavid/ts-events
import { EventEmitter } from '@jvddavid/ts-events'
type TestEventMap = {
test: [message: string]
}
const emitter = new EventEmitter<TestEventMap>()
emitter.on('test', (message) => {
console.log(message)
})