import type { ActionCreator, SelfDispatchingActionCreator } from './store.js'; import { ConnectableInterface } from './types.js'; import type { Constructor } from '../types.js'; import type { Selector } from 'reselect'; export declare const $propertyMap: unique symbol; export interface ConnectedInterface extends ConnectableInterface, EventTarget { [$propertyMap]: Map>; } /** * A class mixin that produces a "connected" extension to a given HTMLElement. * * When a "connected" element attaches to a document, it queries for a store * provider by dispatching a bubbling event. If a provider is listening, it * responds with the instance of the store to be used. * * Any pending self-dispatching actions will dispatch as soon as the store is * associated with the "connected" element. */ export declare const connect: () => >(SuperClass: U) => U & Constructor>; /** * Create a wrapped version of an arbitrary ActionCreator that will * self-dispatch to the store associated with the context that the ActionCreator * is called with. Note that such a wrapped ActionCreator must be called with * a context that expresses the behavior of a ConnectedInterface. * * Example usage: * * import {someActionCreator} from './actions.js'; * * class ConnectedFoo extends connect()(EventTarget) { * #someActionCreator = selfDispatch(someActionCreator); * * onEvent() { * // This will automatically dispatch to the store * // when this instance is connected to it: * this.#someActionCreator(appropriate, args); * } * } */ export declare const selfDispatch: , V extends ActionCreator, W extends any[] = V extends ActionCreator ? X : any[]>(actionCreator: ActionCreator) => SelfDispatchingActionCreator;