I have modelstate looking like this:
var ModelState = {
"model.StartDate": [ "The Start Date field is required." ],
"model.EndDate": [ "The End Date field is required." ]
}
I am then using this script to put this into an array:
var errors = [];
Object.keys(ModelState).forEach(function (key) {
errors.push.apply(errors, ModelState[key]);
});
Can someone help me by telling me what the Typescript definition for errors would be. I realize it will be an array but how can I represent the contents?