export const getOptionProperty = function getOptionProperty(option: any, property: string | ((option: any) => any)): any { if (typeof option === 'string') { return option; } else if (typeof property === 'string') { return option[property]; } else if (typeof property === 'function') { return property(option); } };