Created
June 1, 2022 01:40
-
-
Save casheeeewnuts/207af3cc4b48b1d5d6c219691949f5fb to your computer and use it in GitHub Desktop.
オブジェクトのプロパティに再帰的にReadOnlyを付与する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type RecursiveReadonly<T> = { | |
readonly [K in keyof T]: RecursiveReadonly<T[K]> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment