Как я могу написать функцию, которая может принимать любой тип в качестве аргумента и сохранять информацию о типе аргумента?
const shouldPreserveShapeInfo = (t: any) => t // put any because I want it to work with any shape
const input = {
foo: 'bar',
john:'doe'
}
const result = shouldPreserveShapeInfo(input)
// result is now of type any and lost the shape information of input