Is it possible to extract a nested type object from an interface or parent type?
interface IFake {
button: {
height: {
dense: number;
standard: number;
};
};
otherStuff: string;
}
type Button = Pick<IFake, 'button'>
const aFunction = (button: Button) => button.height.dense
Current Output:
// Button type is {
// button: {
// height: ...
// }
// }
Desired Output:
// Button type is { height: ... }