A factory class that creates and returns notifier strategy instance depend on input NotifierType value.
using the NotifierFactory
NotifierFactory
import { NotifierFactory } from "./NotifierFactory"; @Injectable() class Example { constructor(private readonly notifierFactory: NotifierFactory) {} public notifyInternal() { const emailNotifier = this.notifierFactory.getNotifier(NotifierType.MAIL); await emailNotifier.sendInternal({ to: `recipient@example.com`, subject: `subject`, text: `text content`, html: `<p>html content</p>`, }); } }
v0.3.2
Constructs and prepares an instance of this scheduler.
The EmailNotifier instance of this class.
Method to return an instance of Notifier depends on the input NotifierType.
public
The notifier type to return an instance of.
Generated using TypeDoc
A factory class that creates and returns notifier strategy instance depend on input NotifierType value.
using the
NotifierFactory
v0.3.2