I am looking to create a model class with two variables (label
and key
) that store functions. Each function should take data
as an input object. If no specific functions are specified, default functions should be used. The default label
function will return the input data without any alterations, while the key
function will return data.uuid to retrieve the unique ID of the data object.
Below is my attempt which did not work as expected...
export interface ListConfigModel {
label: (data) => (data);
key: (data) => (data._uuid);
}