Options
All
  • Public
  • Public/Protected
  • All
Menu
description

A factory class that creates and returns notifier strategy instance depend on input NotifierType value.

example

using the 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>`,
});
}
}
since

v0.3.2

Hierarchy

  • NotifierFactory

Index

Constructors

Methods

Constructors

Methods

Generated using TypeDoc