It is kinda hard to explain what i want to achieve (not sure if it is possible) so here it the code:
interface CellConfig {
btn?: cellBtn;
...
}
interface CellBtn {
isEnabled?: boolean;
label?: string;
style?: any;
classes?: any;
}
interface DataSet {
position: number;
name: string;
weight: string;
symbol: string;
config?: *missing part, not sure how to do it*
}
so i want to have something like this:
let dataSet: DataSet = {
position: 1,
name: 'test',
weight: '11',
symbol: '123',
config: { position: { btn: {isEnabled: true }}, name: { btn: { isEnabled: true }}}
}
basically, config should be optional object and only DataSet keys are allowed (except config) and also each key in config object should be of type CellConfig