UNPKG

lib-comfoair

Version:

Library to communicate with Zehnder ComfoAirQ ventilation unit through the ComfoControl gateway

10 lines (9 loc) 421 B
/** * Executes a function and returns its result. If an error occurs, returns the fallback value. * * @template T - The type of the return value. * @param {() => T} fn - The function to execute. * @param {T} fallback - The value to return if an error occurs. * @returns {T} - The result of the function or the fallback value if an error occurs. */ export declare function tryCatch<T>(fn: () => T, fallback: T): T;