回答編集履歴

1

少し追記

2022/09/28 06:33

投稿

maisumakun
maisumakun

スコア145192

test CHANGED
@@ -1,4 +1,4 @@
1
- `readonly`を外したい場合、`-readonly`のように宣言できます([参考](https://stackoverflow.com/questions/42999983/typescript-removing-readonly-modifier))。
1
+ ある型から`readonly`を外した型を作りたい場合、`-readonly`のように宣言できます([参考](https://stackoverflow.com/questions/42999983/typescript-removing-readonly-modifier))。
2
2
 
3
3
  ```typescript
4
4
  type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]> };