Skip to content

Instantly share code, notes, and snippets.

@casheeeewnuts
Created June 1, 2022 01:40
Show Gist options
  • Save casheeeewnuts/207af3cc4b48b1d5d6c219691949f5fb to your computer and use it in GitHub Desktop.
Save casheeeewnuts/207af3cc4b48b1d5d6c219691949f5fb to your computer and use it in GitHub Desktop.
オブジェクトのプロパティに再帰的にReadOnlyを付与する
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