/**
* @license
* Copyright 2025-2026 Open Home Foundation
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Wraps an async function to be used as an event handler.
* Catches any errors and logs them, optionally calling an error callback.
*
* Usage in Lit templates:
* ```
*
* ```
*
* With custom error handling:
* ```
*
* ```
*
* @param fn - Async function to execute
* @param onError - Optional error callback
* @returns Event handler function
*/
export declare function handleAsync(fn: () => Promise, onError?: (error: Error) => void): () => void;
/**
* Wraps an async function that takes an event parameter.
*
* Usage:
* ```
* this._handleChange(e))}>
* ```
*/
export declare function handleAsyncEvent(fn: (event: E) => Promise, onError?: (error: Error) => void): (event: E) => void;
/**
* Fire-and-forget helper for calling async methods from sync contexts.
* Use this when you need to call an async method but can't await it.
*
* Usage in lifecycle methods:
* ```
* connectedCallback() {
* super.connectedCallback();
* fireAndForget(this._loadData());
* }
* ```
*
* @param promise - Promise to execute
* @param onError - Optional error callback
*/
export declare function fireAndForget(promise: Promise, onError?: (error: Error) => void): void;
//# sourceMappingURL=async-handler.d.ts.map