type TypeWithValue<Value extends S.Schema.Any> = { value: S.optionalWithOptions<Value, { nullable: true; }> } // SomeOtherFields &
const makeTypeWithValue = <Value extends S.Schema.Any>(value: Value): TypeWithValue<Value> => ({
//...SomeOtherFields
value: S.optional({ nullable: true })(value)
})
// ts [2322]: Type 'optionalWithOptions<All, { nullable: true; }>' is not assignable to type 'optionalWithOptions<Value, { nullable: true; }>'.
// Types of property 'from' are incompatible.
// Type 'All' is not assignable to type 'Value'.
// 'Value' could be instantiated with an arbitrary type which could be unrelated to 'All'
type TypeWithValue<Value extends S.Schema.Any> = { value: S.optionalWithOptions<Value, { nullable: true; }> } // SomeOtherFields &
const makeTypeWithValue = <Value extends S.Schema.Any>(value: Value): TypeWithValue<Value> => ({
//...SomeOtherFields
value: S.optional({ nullable: true })(value)
})
// ts [2322]: Type 'optionalWithOptions<All, { nullable: true; }>' is not assignable to type 'optionalWithOptions<Value, { nullable: true; }>'.
// Types of property 'from' are incompatible.
// Type 'All' is not assignable to type 'Value'.
// 'Value' could be instantiated with an arbitrary type which could be unrelated to 'All'