Is it possible to create a modified Array
derivative with a different index signature than the original?
One potential example could be:
interface SaferArray<T> extends Array<T> {
[i: number]: T | undefined
}
However, there seems to be an error:
Error: Interface incorrectly extends interface 'T[]'.
Index signatures are incompatible.
Type 'T | undefined' is not assignable to type 'T'.