readonly
[ TypeScript ] type-challenges - 00007-easy-readonly
00007-easy-readonly [ 문제 설명 ] Implement the built-in `Readonly` generic without using it. Constructs a type with all properties of T set to readonly, meaning the properties of the constructed type cannot be reassigned. [ 문제 ] type MyReadonly = any [ 예시 ] interface Todo { title: string description: string } const todo: MyReadonly = { title: "Hey", description: "foobar" } todo.title = "Hello" // ..