When working with NgRx actions, I need to define the parameter. This parameter is an object that can contain a varying number of specific objects. These objects are already defined in an Interface.
export interface CustomDistribution {
maxWindowsActive: number,
resize: boolean,
}
I attempted the following code but encountered issues:
export const updateCustomDistributions = createAction(
'[Custom Distributions] update Custom Distributions',
props<{ customDistributions: CustomDistribution{} }>(),
);
Here is an example of the expected object structure and type:
distributions: {
right: {
maxWindowsActive: 1;
resize: true
},
left: {
maxWindowsActive: 2;
resize: false
}
}