Complete worked example
typescript
type WebsitePatch = { website?: string | null };
const keep: WebsitePatch = {};
const clear: WebsitePatch = { website: null };
const replace: WebsitePatch = { website: "https://example.com" };- Reasoning
- The three constructions encode three different patch operations deliberately.