You can use an intersection type:
let customers:Customer[] & { lastDateRetrieved?: Date} =[];
customers.lastDateRetrieved=new Date ();
Or you can create a general type for this use case:
type ArrayWithProps<T> = T[] & { lastDateRetrieved?: Date}
let customers:ArrayWithProps<Customer> =[];
customers.lastDateRetrieved=new Date ();
You could also create a class derived from array, but then you would need to use the constructor of the class to initialize the array, and you can't use []:
class ArrayWithProps<T> extends Array<T> {
lastDateRetrieved: Date;
constructor (... items : T[]){
super(...items);
}
}
var f = new ArrayWithProps();
f.push(new Customer());
f.lastDateRetrieved = new Date();