New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
emit('eventName')
returns as emit(undefined)
#89
Labels
Comments
Never mind I just saw the TypeScript instructions |
Wait no, even after adding the correct typings... type Events = {
closeMailer: undefined
}
const eventBus: Emittery<Events> = new Emittery<Events>({
debug: {
name: 'eventBus',
enabled: process.env.ENVIRONMENT !== 'production',
logger: (type, debugName, eventName, eventData) => {
logger.debug(`${debugName}: ${type} ${JSON.stringify(eventName)}`, eventData)
}
}
}) I get:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My emitter:
My handler
My event
The result:
When I try to use a
Symbol
instead of astring
, as specified in theREADME
, TypeScript says it's an invalid type for the parameter.The text was updated successfully, but these errors were encountered: