PD: I don't know if it's the correct answer, but it's what I would of done :)
I think it fails because we always expect the output type to be equal to the generic type, although we always return a User.
Typescript tells us that if we pass in a generic type, for example:
createCustomer<{ id: number, kind: string, other: number }>({
id: 1,
kind: 'customer'
});