Read-Only Array and Tuple Types in TypeScript

added by JavaScript Kicks
9/17/2019 7:24:12 AM

339 Views

TypeScript 3.4 added a bit of syntactic sugar to the language that makes it easier to work with read-only array and tuple types. We can now use the readonly modifier to create read-only array types (such as readonly string[]) or read-only tuple types (such as readonly [number, number]).


0 comments