What class does ReadonlyArray inherit?

Viewed 575

I have this code snippet in TypeScript:

const arr: ReadonlyArray<string> = [
    "123",
    "234"
];

arr.push("345");

TS compiler shows an error:

Property 'push' does not exist on type 'ReadonlyArray<string>'.

Of course, it's clear that I cannot change/alter this array. The question is: what is the base class for ReadonlyArray? Does it inherit from standard Array class?

1 Answers
Related