import type { ReactiveController, ReactiveControllerHost } from "./ReactiveController.ts"; /** * Creates a reactive controller that can react to the host's lifecycle events. * * @beta This API is in beta and may change in future releases. */ export declare function createEffect(host: H, setup: Effect.Setup): Effect; export type Effect = ReactiveController & { /** * Sets up the effect * * @remarks * * This is typically called when the host is connected. */ setup(): void; /** * Tears down the effect * * @remarks * * This is typically called when the host is disconnected. */ teardown(): void; /** * Disposes of the effect, tearing it down and preventing * it from be **automatically** set up again. * * @remarks * * This should be called when the effect is no longer needed. */ dispose(): void; }; export declare namespace Effect { type Teardown = (host: H) => void; type Setup = (host: H) => Teardown | void; } export { createEffect as effect, }; //# sourceMappingURL=Effect.d.ts.map