From d794e5f72bd09eb182d455bb4f8ec0d553082405 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Tue, 26 Nov 2019 16:47:24 +0100 Subject: [PATCH] fix(email-plugin): Fix TypeScript compiler error on defaultEmailHandlers --- packages/dev-server/dev-config.ts | 2 +- packages/email-plugin/src/default-email-handlers.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/dev-server/dev-config.ts b/packages/dev-server/dev-config.ts index e1770b9274..68f662ea67 100644 --- a/packages/dev-server/dev-config.ts +++ b/packages/dev-server/dev-config.ts @@ -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, diff --git a/packages/email-plugin/src/default-email-handlers.ts b/packages/email-plugin/src/default-email-handlers.ts index d1306ed507..fe86afadd2 100644 --- a/packages/email-plugin/src/default-email-handlers.ts +++ b/packages/email-plugin/src/default-email-handlers.ts @@ -6,6 +6,7 @@ import { PasswordResetEvent, } from '@vendure/core'; +import { EmailEventHandler } from './event-handler'; import { EmailEventListener } from './event-listener'; import { mockAccountRegistrationEvent, @@ -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> = [ orderConfirmationHandler, emailVerificationHandler, passwordResetHandler,