const UnsavedUserDto = S.struct({
name: S.string.pipe(
S.nonEmpty({
message: () => "Name cannot be empty",
}),
),
});
const UserDto = S.union(UnsavedUserDto, S.struct({ id: S.UUID }));
const UnsavedUserDto = S.struct({
name: S.string.pipe(
S.nonEmpty({
message: () => "Name cannot be empty",
}),
),
});
const UserDto = S.union(UnsavedUserDto, S.struct({ id: S.UUID }));