Type arrays using string[] (or Array<string>). When you need a fixed-length array where each position has a specific type (like [id, name]), use a Tuple. Prefix with readonly when an array should never be mutated.
ADVERTISEMENT
We use cookies to collect and analyse information on site performance and usage, and to enhance and customise content and advertisements. Learn more
Required for basic website functionality.
Help us understand how visitors interact with the site.
Used to show relevant ads and measure ad performance.