repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge dependabot/npm_and_yarn/examples/typescript/websocket-server-pool/ws-worker_thr...
[poolifier.git]
/
examples
/
typescript
/
smtp-client-pool
/
src
/
worker.ts
diff --git
a/examples/typescript/smtp-client-pool/src/worker.ts
b/examples/typescript/smtp-client-pool/src/worker.ts
index 3ac62ccac60ecf7ffd2fb75d04c35e06a7303872..622886351e71d9e2d234548fc2009ad3639d6aa4 100644
(file)
--- a/
examples/typescript/smtp-client-pool/src/worker.ts
+++ b/
examples/typescript/smtp-client-pool/src/worker.ts
@@
-1,8
+1,8
@@
-import { ThreadWorker } from 'poolifier'
import { createTransport } from 'nodemailer'
import { createTransport } from 'nodemailer'
-import type Mail from 'nodemailer/lib/mailer/index.js'
import type SMTPTransport from 'nodemailer/lib/smtp-transport/index.js'
import type SMTPTransport from 'nodemailer/lib/smtp-transport/index.js'
-import { type WorkerData } from './types.js'
+import { ThreadWorker } from 'poolifier'
+
+import type { WorkerData } from './types.js'
class SmtpClientWorker extends ThreadWorker<
WorkerData,
class SmtpClientWorker extends ThreadWorker<
WorkerData,
@@
-12,7
+12,7
@@
SMTPTransport.SentMessageInfo
super({
nodemailer: async (workerData?: WorkerData) => {
return await createTransport(workerData?.smtpTransport).sendMail(
super({
nodemailer: async (workerData?: WorkerData) => {
return await createTransport(workerData?.smtpTransport).sendMail(
- workerData
?.mail as Mail.Options
+ workerData
!.mail
)
}
})
)
}
})