Learn why TypeScript generates an error when using generics in an object transformation function and how to properly implement type preservation.