import { type Option, type Result } from "@tsus/runtime";export type Profile = { name: string; email: Option<string>; phone: Option<string> };/** * `None` means keep. For email and phone, `Some(None)` means clear and * `Some(Some(value))` means set. For name, `Some(value)` means set. */export type ProfilePatch = { name: Option<string>; email: Option<Option<string>>; phone: Option<Option<string>>;};export type ProfileError = { kind: "invalid_name" | "invalid_email" | "invalid_phone" };export const applyPatch = (profile: Profile, patch: ProfilePatch): Result<Profile, ProfileError> => { // TODO};