Skip to content

Instantly share code, notes, and snippets.

@anztrax
Created November 30, 2025 00:05
Show Gist options
  • Select an option

  • Save anztrax/743bad211a07dd7b08af76c722f92112 to your computer and use it in GitHub Desktop.

Select an option

Save anztrax/743bad211a07dd7b08af76c722f92112 to your computer and use it in GitHub Desktop.
Simple implementation of Readonly in Typescript
type MyReadonly<T> = {
readonly [A in keyof T]: T[A]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment