I've been struggling to pass this TypeScript array to a function. Despite trying multiple parameter types in an attempt to get it to compile, none of them have worked so far. Here is the array in question:
var driverTally = [
{ driver: 'driver1', numEscorts: 0},
{ driver: 'driver2', numEscorts: 0},
{ driver: 'driver3', numEscorts: 0}
];
doStuff(driverTally : Array<[string,number]>){ ... }
The compiler error I keep encountering says: "Argument of type '{ driver: string; numEscorts: number; }[]' is not assignable to parameter of type '[string, number][]'.