Skip to content
Toying with the idea of a MediatR style command pattern in TypeScript.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
app
handlers
infrastructure
.gitignore
README.md
package.json
tsconfig.json

README.md

TypeScriptCommandPattern

Toying with the idea of a MediatR style command pattern in TypeScript.

Usage

See the index.ts file to see how a command is invoked with an expected TResponse.

Handlers

As seen in the example handler test-handler.ts, each handler is responsible with initializing and registering itself in a singleton manner.

A very simple Container

The only thing the container knows is to map an incoming request type name to a pre-registered handler.

You can’t perform that action at this time.