Skip to content
webtype.org#219 rebuild-partial · par 2

No. 219 · July 27, 2026 · Gentle

Rebuild Partial

Implement `MyPartial<T>` so every property becomes optional. Making the value accept `undefined` is not the same thing — the key itself has to become optional.

01

Puzzle

Par 2

Puzzle

rebuild-partial.ts
interface User {
  id: number
  name: string
}
Stroke 1 of 2Not run yet

Replace ??? — your solution is checked against the cases below.

Checks

3
  • MyPartial<User>
    { id?: number; name?: string }
  • MyPartial<{ a: string }>
    { a?: string }
  • MyPartial<{}>
    {}

How a check is judged Exact type equality, not assignability — an intersection is not the same as the flattened object.

How everyone did

Nobody is counting yet. Score distribution and the short game board arrive with accounts — until then your results stay on this device.

Archive
02

Annotated solution

This write-up publishes 24 hours after the puzzle closes.