I want to import a node module and add it to my command.ts
in cypress. the tutorial suggests adding
import 'cypress-mailhog';
to the command.js
file. when I add it to my command.ts
file, I am not able to use the command for example
cy.mhGetMailsBySubject
the error is TS2339: Property 'mhGetMailsBySubject' does not exist on type 'cy & EventEmitter'.
the modules I am trying to use is https://www.npmjs.com/package/cypress-mailhog
in my tsconfig.json file i have the following, among others
"target": "es6",
"module": "commonjs",
"lib": ["dom","es6", "es5", "dom.iterable"]
How could I use mhGetMailsBySubject
in my test case