Matching Implementation to Interface in TypeScript

How can I make this implementation match the desired interface?

export class EventService extends Effect.Tag("@boda/event-service")<
  EventService,
  {
    publish(payload: event.Notification): Effect.Effect<void, never>;
  }
>() {
  static Live = EventService.of({
    publish(payload) {
      return Effect.tryPromise({
        try: () => {
          return db
            .insertInto("events")
            .values(event.encode(payload))
            .execute();
        },
        catch: (error) =>
          Effect.gen(function* (_) {
            yield* Effect.logError("Error publishing event", error);
            yield* Effect.succeedNone;
          }),
      }).pipe(Effect.asVoid, Effect.withLogSpan("EventService.publish"));
    },
  });
}

The inferred type is:
Effect<void, Effect<void, never, never>, never>
Was this page helpful?