interface Wrapped<T> {
data: T;
}
interface BetterWrapper<T> {
betterData: T;
}
function abc<T>(test: Wrapped<T>): BetterWrapper<T> {
return {betterData: test.data}
}
const result = abc<string>.call({}, { data: 'hello' });
Given something like the above, I'm seeing an error that says cannot find name call. I'm guessing that's because the return type is a string, if so what's the right now to represent this in typescript?