refactor: improve types testing types definition
[e-mobility-charging-stations-simulator.git] / ui / web / src / composables / Utils.ts
1 export const ifUndefined = <T>(value: T | undefined, isValue: T): T => {
2 if (value === undefined) return isValue
3 return value as T
4 }
5
6 // export const compose = <T>(...fns: ((arg: T) => T)[]): ((x: T) => T) => {
7 // return (x: T) => fns.reduceRight((y, fn) => fn(y), x)
8 // }