import Collection, { DefaultDataItem, ItemKey } from "./index"; import Computed from "../computed"; import { StorageKey } from "../storage"; export declare type SelectorKey = string | number; export interface SelectorConfigInterface { key?: SelectorKey; } export default class Selector extends Computed { collection: () => Collection; _id: ItemKey; constructor(collection: Collection, id: ItemKey, config?: SelectorConfigInterface); set id(val: ItemKey); get id(): ItemKey; /** * Changes the id on which the selector is watching */ select(id: ItemKey, options?: { background?: boolean; sideEffects?: boolean; }): this; /** * Saves the state in the local storage or in a own configured storage * @param key - the storage key (if no key passed it will take the state key) */ persist(key?: StorageKey): this; /** * @internal * Will return the perstiable Value of this state.. */ getPersistableValue(): import("../event").EventKey; }