mailosaur/cypress-mailosaur

Unable to import types from version `2.5.1` and above.

coldlink opened this issue · 4 comments

Hey all!

I've noticed that when updated the cypress-mailosaur package to version 2.5.1 or above, I've noticed that types are (seemingly) no longer exported.

Pre 2.5.1 when using the library with Cypress in typescript mode, we would import the types and use them in some wrapper methods that consumed the types.

Here's a contrived example of a use case

import { Message } from 'cypress-mailosaur';

const getEmailDetails = (email: Message) => {
  const { id, html } = email;
  
  // do stuff with the email here
  ...
};

However when attempting to upgrade we're now getting the following error

cypress/support/commands/getEmailDetails.ts:1:16 - error TS2305: Module '"cypress-mailosaur"' has no exported member 'Message'.

1 import { Message } from 'cypress-mailosaur';

Just wondering if there were any changes made to the typings recently, or a way of fixing this issue! Thanks.

Hey @coldlink - sorry about this, we'll get on it and message you when there's a fix.

Hey @coldlink - sorry about this, we'll get on it and message you when there's a fix.

Thanks for investigating!

Hi again @coldlink - should be fixed in new release 2.6.0 (which is being released right now), sorry about the bug!

No worries! Thanks for your help. 😄