How typescript describes arrays with interfaces

recently in learning TS, refer to this tutorial . For the example given in, use the interface to describe the array

interface NumberArray {
    [index: number]: number;
}
let fibonacci: NumberArray = [1, 1, 2, 3, 5];

so, if the code says so

interface NumberArray {
    [index: string]: number;
}

so how can I write an array that matches the interface

Jun.29,2021

confused myself. The array whose key value is of type string is the literal quantity of the object.

Menu