У меня есть следующие типы, которые я пытаюсь получить требуемый путь, не жертвуя типом. Но выдает следующую ошибку
export interface IProps {
user: any;
car: IVehicle;
}
export interface IVehicle {
kind: String;
color: String;
}
_.get<IProps, 'car.color'>(props, 'car.color');
Error
[ts] Argument of type '"car.color"' is not assignable to parameter of type 'number'.