Skip to content

Commit

Permalink
fix(email-plugin): Fix TypeScript compiler error on defaultEmailHandlers
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Nov 26, 2019
1 parent 5fe0d53 commit d794e5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/dev-server/dev-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const devConfig: VendureConfig = {
// }),
EmailPlugin.init({
devMode: true,
handlers: defaultEmailHandlers as any,
handlers: defaultEmailHandlers,
templatePath: path.join(__dirname, '../email-plugin/templates'),
outputPath: path.join(__dirname, 'test-emails'),
mailboxPort: 5003,
Expand Down
3 changes: 2 additions & 1 deletion packages/email-plugin/src/default-email-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
PasswordResetEvent,
} from '@vendure/core';

import { EmailEventHandler } from './event-handler';
import { EmailEventListener } from './event-listener';
import {
mockAccountRegistrationEvent,
Expand Down Expand Up @@ -47,7 +48,7 @@ export const emailAddressChangeHandler = new EmailEventListener('email-address-c
.setTemplateVars(event => ({ user: event.user }))
.setMockEvent(mockEmailAddressChangeEvent);

export const defaultEmailHandlers = [
export const defaultEmailHandlers: Array<EmailEventHandler<any, any>> = [
orderConfirmationHandler,
emailVerificationHandler,
passwordResetHandler,
Expand Down

0 comments on commit d794e5f

Please sign in to comment.