import type { AsyncState } from './types.js'; /** * Decorator that syncs an async state and automatically updates the decorated property * with the latest value from a Promise or AsyncIterable. * * The decorator accepts a factory function that will be called for each component instance * to create the async state to sync. * * @example * ```ts * class MyElement extends LitElement { * @sync(() => fetchData()) * accessor data: string | undefined; * * @sync(() => pollingGenerator()) * accessor liveData: number | undefined; * * @sync(function() { return this.myAsyncMethod() }) * accessor computed: string | undefined; * } * ``` * * @param stateFactory - A function that returns the async state to sync (Promise, AsyncIterable, or direct value) * @returns A property decorator function */ export declare function sync(stateFactory: (this: any) => AsyncState): (target: ClassAccessorDecoratorTarget, context: ClassAccessorDecoratorContext) => ClassAccessorDecoratorResult; //# sourceMappingURL=decorator.d.ts.map