Typescript Union Type From String To Float Javascript Array Of Objects