Created
November 30, 2025 00:05
-
-
Save anztrax/743bad211a07dd7b08af76c722f92112 to your computer and use it in GitHub Desktop.
Simple implementation of Readonly in Typescript
This file contains hidden or 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 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