File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 ],
4040 "license" : " MIT" ,
4141 "main" : " dist/index.js" ,
42+ "exports" : {
43+ "." : {
44+ "require" : " ./dist/index.js" ,
45+ "types" : " ./dist/index.d.ts"
46+ },
47+ "./package.json" : " ./package.json"
48+ },
4249 "peerDependencies" : {
4350 "@types/nodemailer" : " ^6.4.9" ,
4451 "nodemailer" : " ^7.0.7"
Original file line number Diff line number Diff line change 11import { Transport } from "nodemailer" ;
2- import MailMessage from "nodemailer/lib/mailer/mail-message" ;
32
43import MailtrapClient from "./MailtrapClient" ;
54import normalizeCallback from "./normalizer" ;
@@ -11,6 +10,7 @@ import {
1110 MailtrapResponse ,
1211 MailtrapTransporter ,
1312 NormalizeCallback ,
13+ MailMessage ,
1414} from "../types/transport" ;
1515
1616const { TRANSPORT_SETTINGS } = CONFIG ;
Original file line number Diff line number Diff line change 11import NodemailerMail = require( "nodemailer/lib/mailer" ) ;
22
3- import { Transporter } from "nodemailer" ;
3+ import { Transport , Transporter } from "nodemailer" ;
44import {
55 SendResponse ,
66 SendError ,
@@ -51,3 +51,5 @@ export interface MailtrapTransporter extends Transporter<MailtrapResponse> {
5151 mailOptions : MailtrapMailOptions | MailtrapMailOptionsSandbox
5252 ) : Promise < MailtrapResponse > ;
5353}
54+
55+ export type MailMessage < T > = Parameters < Transport < T > [ "send" ] > [ 0 ] ;
Original file line number Diff line number Diff line change 77 "declaration" : true ,
88 "outDir" : " ./dist" ,
99 "skipLibCheck" : true ,
10- "esModuleInterop" : true
10+ "esModuleInterop" : true ,
11+ "allowSyntheticDefaultImports" : true ,
12+ "declarationMap" : true ,
13+ "forceConsistentCasingInFileNames" : true
1114 },
1215 "include" : [" src" ],
1316 "exclude" : [" node_modules" , " examples" ]
You can’t perform that action at this time.
0 commit comments