1 | import { AnyEntry } from "./entry.js";
|
2 | import { OptimisticWrapOptions } from "./index.js";
|
3 | import { Unsubscribable } from "./helpers.js";
|
4 | type EntryMethodName = keyof typeof EntryMethods;
|
5 | declare const EntryMethods: {
|
6 | setDirty: boolean;
|
7 | dispose: boolean;
|
8 | forget: boolean;
|
9 | };
|
10 | export type OptimisticDependencyFunction<TKey> = ((key: TKey) => void) & {
|
11 | dirty: (key: TKey, entryMethodName?: EntryMethodName) => void;
|
12 | };
|
13 | export type Dep<TKey> = Set<AnyEntry> & {
|
14 | subscribe: OptimisticWrapOptions<[TKey]>["subscribe"];
|
15 | } & Unsubscribable;
|
16 | export declare function dep<TKey>(options?: {
|
17 | subscribe: Dep<TKey>["subscribe"];
|
18 | }): OptimisticDependencyFunction<TKey>;
|
19 | export {};
|