readonly array in typescript

Solutions on MaxInterview for readonly array in typescript by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
showing results for - "readonly array in typescript"
Andres
10 Aug 2017
1function foo(pair: readonly [string, string]) {
2    console.log(pair[0]);   // okay
3    pair[1] = "hello!";     // error
4}
5