import { Data } from "effect"
type FooBar<Type> = Data.TaggedEnum<{
Foo: { prop: Type };
Bar: { prop?: Type };
}>;
interface FooBarDefinition extends Data.TaggedEnum.WithGenerics<1> {
readonly taggedEnum: FooBar<this['A']>;
}
const { Foo, Bar, $match } = Data.taggedEnum<FooBarDefinition>();
import { Data } from "effect"
type FooBar<Type> = Data.TaggedEnum<{
Foo: { prop: Type };
Bar: { prop?: Type };
}>;
interface FooBarDefinition extends Data.TaggedEnum.WithGenerics<1> {
readonly taggedEnum: FooBar<this['A']>;
}
const { Foo, Bar, $match } = Data.taggedEnum<FooBarDefinition>();