Created
December 17, 2019 18:18
-
-
Save carlrip/eac4f7cb23b3bb148ec3960732cb9402 to your computer and use it in GitHub Desktop.
ReadonlyArray generic type
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 Person = { | |
readonly name: string; | |
readonly scores: ReadonlyArray<number>; // same as readonly number[] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment