Effect CommunityEC
Effect Community3w ago
1 reply
David

Inquiry about a Helper Class for Tagging in Effect

Does Effect have a helper class like Data.Class or TaggedClass that just adds the tag as a private property as well, to "brand" it.

Eg.
export class IconHelperKey extends Data.Class<{
  readonly title: string;
}> {
 private readonly __brand = "IconHelperKey" as const;
}

Mostly curious because for Equal.equals, it might be tempting for people to just pass _tag in an object when required, but with this setup you can't do that (so easily)
Was this page helpful?