{ map: <obj> }. I can write a simple recursive function to mapWrap some data, or to unMapWrap it when I receive it. I can also define a generic type that expresses the relationship between a MapWrapped<T> and the unwrapped type. But I don't know how to make TS understand that the mapWrap<T> function produces the MapWrapped<T> type without casting to any multiple times.