Effect CommunityEC
Effect Community2y ago
26 replies
Anna | DevMiner

Generic Constraint for Tagged Class in TypeScript

How do I write a generic constraint for any tagged class for the given function? I couldn't find anything on it.
declare writeToStream: <T extends TaggedClass<any, string, any>>(
  streamName: string,
  event: T,
) => Effect.Effect<void, EventDBError>;
Was this page helpful?