I need help with a standard interface:
interface IProps<T> {
item: T;
key: keyof T;
}
Is there a way to guarantee that item[key]
is either a string or number so it can be used as an index for
Record<string | number, string>
?
My codebase is written in typescript v3.9.