Effect CommunityEC
Effect Communityβ€’2mo agoβ€’
22 replies
Sebastianlum

Cleaning Up Duplicate Union Types in Effect Return Types

Is there a good way to clean up the return types of Effects? I often get this weird union of two identical types when catching errors.
const paymentPoll: Effect.Effect<{
    checked: number;
    updated: number;
    errors: number;
} | {
    checked: number;
    updated: number;
    errors: number;
}, never, DbCtx>
Was this page helpful?