I have been using the following function for a while but I want to make it type safe:
function mappedBy(models, mapper, ...fields) { if (!mapper) { map