So I am working on a react-native project. I was hoping if one could infer Generic types from implementation.
type itemType<T> = { item: T };
const someItem = {
item: 'Some String'
};
type someItemType = typeof someItem;
// So Here someItemType will be {item: string}, i want it to be itemType<string> and
// in this example i have implemented itemType but in real use case i want to infer
//it from the actual implementation