Answers for "readonly array in typescript"

0

readonly array in typescript

function foo(pair: readonly [string, string]) {
    console.log(pair[0]);   // okay
    pair[1] = "hello!";     // error
}
Posted by: Guest on December-07-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language