import { Schema as S } from 'effect';
import { expectType } from 'tsd';
const struct = S.Struct({ foo: S.NumberFromString });
const schema = S.asSchema(struct);
// ^ type:
// S.Schema<{ readonly foo: number }, { readonly foo: string }, never>
type goal = S.Schema<{ foo: number }, Record<string, string>>;
type actual = S.Schema<{ foo: number }, { foo: string }>;
expectType<goal>(struct);
// 〰️〰️〰️〰️
// Argument of type 'Struct<{ foo: typeof NumberFromString; }>' is not assignable to parameter of type 'goal'.
expectType<actual>(struct);
import { Schema as S } from 'effect';
import { expectType } from 'tsd';
const struct = S.Struct({ foo: S.NumberFromString });
const schema = S.asSchema(struct);
// ^ type:
// S.Schema<{ readonly foo: number }, { readonly foo: string }, never>
type goal = S.Schema<{ foo: number }, Record<string, string>>;
type actual = S.Schema<{ foo: number }, { foo: string }>;
expectType<goal>(struct);
// 〰️〰️〰️〰️
// Argument of type 'Struct<{ foo: typeof NumberFromString; }>' is not assignable to parameter of type 'goal'.
expectType<actual>(struct);