questions/00009-medium-deep-readonly/README.ja.md
オブジェクトのすべてのパラメーター(およびそのサブオブジェクトを再帰的に)を読み取り専用にするDeepReadonly<T>を実装します。
この課題ではオブジェクトのみを扱っていると想定してください。配列、関数、クラスなどは考慮する必要はありません。しかし、可能な限り様々なケースをカバーすることで、自分自身に挑戦することができます。
例えば
type X = {
x: {
a: 1
b: 'hi'
}
y: 'hey'
}
type Expected = {
readonly x: {
readonly a: 1
readonly b: 'hi'
}
readonly y: 'hey'
}
type Todo = DeepReadonly<X> // should be same as `Expected`
<a href="../../README.ja.md" target="_blank"></a> <a href="https://tsch.js.org/9/answer/ja" target="_blank"></a> <a href="https://tsch.js.org/9/solutions" target="_blank"></a> <hr><h3>関連する課題</h3><a href="https://github.com/type-challenges/type-challenges/blob/main/questions/00007-easy-readonly/README.ja.md" target="_blank"></a> <a href="https://github.com/type-challenges/type-challenges/blob/main/questions/00008-medium-readonly-2/README.ja.md" target="_blank"></a> <!--info-footer-end-->