Gives: "Type '() => undefined' is not assignable to type 'LazyArg<{ readonly Foo: string; }>'" for the
() => undefined
() => undefined
And on usage,
yield* Schema.decodeUnknown(schema)(undefined)
yield* Schema.decodeUnknown(schema)(undefined)
Gives: "Argument of type 'optionalWith<Struct<{ Foo: optionalWith<typeof String$, { default: () => string; }>; }>, OptionalOptions<{ readonly Foo: string; }>>' is not assignable to parameter of type 'Schema<unknown, unknown, unknown>'" for the
schema
schema
I want the struct to be optional, and be filled with member defaults if undefined. If it is supplied, any missing members should be get defaults.