stemmlerjs / ddd-forum

Hacker news-inspired forum app built with TypeScript using DDD practices from solidbook.io.
https://dddforum.com
ISC License
1.95k stars 441 forks source link

[Question] Passing type and not using it in interface #79

Open LukaszUrb opened 2 years ago

LukaszUrb commented 2 years ago

Hello.

Path: src\shared\domain\events\IHandle.ts

Why do you pass type IDomainEvent in this file and don't use it at all?

import { IDomainEvent } from "./IDomainEvent";

export interface IHandle<IDomainEvent> { 
  setupSubscriptions(): void;
}

Maybe instead of

export interface IHandle<IDomainEvent> {

it should be:

export interface IHandle extends IDomainEvent