Code compatibility issue with different versions of "@effect/data", "@effect/io", and "@effect/sc...
I have this super noob question, this piece of code:
Worked with:
but not with:
It fails TS with:
And I can't figure out why... Any clue?
pipe(
ctx.selectedMembershipRole,
O.fromNullable,
Effect.catchTag('NoSuchElementException', () =>
Effect.fail(new NoSelectedMembershipException({}))
)
);pipe(
ctx.selectedMembershipRole,
O.fromNullable,
Effect.catchTag('NoSuchElementException', () =>
Effect.fail(new NoSelectedMembershipException({}))
)
);Worked with:
"@effect/data": "^0.12.10",
"@effect/io": "^0.29.2",
"@effect/schema": "^0.23.0","@effect/data": "^0.12.10",
"@effect/io": "^0.29.2",
"@effect/schema": "^0.23.0",but not with:
"@effect/data": "^0.15.0",
"@effect/io": "^0.32.2",
"@effect/schema": "^0.26.1","@effect/data": "^0.15.0",
"@effect/io": "^0.32.2",
"@effect/schema": "^0.26.1",It fails TS with:
Argument of type '<R, A>(self: Effect<R, { _tag: string; }, A>) => Effect<R, { _tag: string; } | NoSelectedMembershipException, A>' is not assignable to parameter of type '(b: Option<{ workspaceId: string & BRAND<"ID">; role: "member" | "admin" | "owner"; }>) => Effect<unknown, { _tag: string; } | NoSelectedMembershipException, unknown>'.
Types of parameters 'self' and 'b' are incompatible.
Type 'Option<{ workspaceId: string & BRAND<"ID">; role: "member" | "admin" | "owner"; }>' is not assignable to type 'Effect<unknown, { _tag: string; }, unknown>'.
Type 'None<{ workspaceId: string & BRAND<"ID">; role: "member" | "admin" | "owner"; }>' is missing the following properties from type 'Effect<unknown, { _tag: string; }, unknown>': [EffectTypeId], [symbol], [symbol]Argument of type '<R, A>(self: Effect<R, { _tag: string; }, A>) => Effect<R, { _tag: string; } | NoSelectedMembershipException, A>' is not assignable to parameter of type '(b: Option<{ workspaceId: string & BRAND<"ID">; role: "member" | "admin" | "owner"; }>) => Effect<unknown, { _tag: string; } | NoSelectedMembershipException, unknown>'.
Types of parameters 'self' and 'b' are incompatible.
Type 'Option<{ workspaceId: string & BRAND<"ID">; role: "member" | "admin" | "owner"; }>' is not assignable to type 'Effect<unknown, { _tag: string; }, unknown>'.
Type 'None<{ workspaceId: string & BRAND<"ID">; role: "member" | "admin" | "owner"; }>' is missing the following properties from type 'Effect<unknown, { _tag: string; }, unknown>': [EffectTypeId], [symbol], [symbol]And I can't figure out why... Any clue?
