const Profile = type({
username: "string",
password: StringWithOptionalModification,
firstName: "string",
lastName: "string",
}).pipe((s) => {
const { password, ...rest } = s;
const passwordObj = password !== null ? { password } : {};
return {
...rest,
...passwordObj,
};
});
const Profile = type({
username: "string",
password: StringWithOptionalModification,
firstName: "string",
lastName: "string",
}).pipe((s) => {
const { password, ...rest } = s;
const passwordObj = password !== null ? { password } : {};
return {
...rest,
...passwordObj,
};
});