This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously. closes #1282
13 lines
259 B
TypeScript
13 lines
259 B
TypeScript
import mailer, { EmailSendOptions, EmailTypes } from "../../mailer";
|
|
|
|
type EmailEvent = {
|
|
type: EmailTypes;
|
|
opts: EmailSendOptions;
|
|
};
|
|
|
|
export default class EmailsProcessor {
|
|
async on(event: EmailEvent) {
|
|
await mailer[event.type](event.opts);
|
|
}
|
|
}
|