export interface Mail { to: string; subject: string; text: string; } /** Отправка писем. Почтовый сервис ещё не выбран — пока письма пишутся в лог. */ export interface Mailer { send(mail: Mail): Promise; } export const consoleMailer: Mailer = { async send(mail) { console.log(`[mail → ${mail.to}] ${mail.subject}\n${mail.text}`); }, };