How to make a readonly tuple type in TypeScript?
Originally Published Here ๐!
To make a readonly tuple type, we can use the keyword readonly before the tuple type declaration body in TypeScript.
TL;DR
// a readonly tuple type
type ReadonlyTupleType = readonly [string, number];
// assign the tuple...
melvingeorge-me.hashnode.dev2 min read