solution for TypeScript puzzle
3. implement Readonly<T>

Looking at the code example, we can see that the requirment is to add readonly on each property name.

To achieve this, we can just use Mapped Type, which allows us to basically map the property to the readonly verison.

type MyReadonly<T> = { 
  readonly [P in keyof T]: T[P] 
You might also be able to find a solution fromcommunity posts or fromAI solution.