47b3ad1387
* remove duplicate calculate-active-index calculation * make codebase a bit more consistent * remove duplicate resolve-prop-value
6 lines
210 B
TypeScript
6 lines
210 B
TypeScript
export function resolvePropValue<TProperty, TBag>(property: TProperty, bag: TBag) {
|
|
if (property === undefined) return undefined
|
|
if (typeof property === 'function') return property(bag)
|
|
return property
|
|
}
|