Effect CommunityEC
Effect Community3y ago
100 replies
ts

Version mismatch causing type error in schema and effect libraries

import * as O from 'effect/Option';
import * as S from '@effect/schema/Schema';
// Type '{ readonly _tag: "None"; } | { readonly _tag: "Some"; readonly value: string; }' is not assignable to type 'Option<string>'. [2322]
const foo: S.Schema<O.Option<string>> = S.option(S.string);


        "@effect/schema": "^0.33.1",
        "effect": "2.0.0-next.26",

I assume this is rooted in a version mismatch? I didn't see schema in effect yet.
Was this page helpful?