cf.completefrontend

Write the codeEasy

Write MyPartial<T> without using the built-in Partial.

MyPartial<T> makes every property of T optional, and keeps everything else about it, such as readonly, the same.

Write this
type MyPartial<T> = T; // make every property of T optional // type Draft = MyPartial<{ name: string; age: number }>;// { name?: string; age?: number }

Solve it in the editor

The answer

Write it yourself first. Then compare it with a reference solution and the checks it passes.

Checking your sign-in…