Skip to content

Commit

Permalink
fix type and bump v5.0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDecollas committed Feb 14, 2022
1 parent 6f03e45 commit 7eb31d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nestjs-geteventstore",
"version": "5.0.16",
"version": "5.0.17π",
"description": "Event Store connector for NestJS-Cqrs",
"author": "Vincent Vermersch <vincent.vermersch@prestashop.com >",
"contributors": [
Expand Down
8 changes: 2 additions & 6 deletions src/interfaces/config/read-event-bus-config.type.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { ReadEventOptionsType, IReadEvent } from '../events';
import { ReadEventOptionsType, IReadEvent, IBaseEvent } from '../events';
import { IEventBusPrepublishConfig } from './event-bus-prepublish-config.interface';

type EventMapperType = (
data: any,
options: ReadEventOptionsType,
) => IReadEvent | null;

type EventConstructorType<T extends IReadEvent = IReadEvent> = new (
...args: any[]
) => T;

export type ReadEventBusConfigType<T extends IReadEvent = IReadEvent> =
IEventBusPrepublishConfig<T> & {
eventMapper?: EventMapperType;
allowedEvents?: { [key: string]: EventConstructorType };
allowedEvents?: { [key: string]: IBaseEvent };
};

0 comments on commit 7eb31d4

Please sign in to comment.