import { AbstractStore } from "./abstract-store.ts"; import type { Factory } from "./factory.ts"; import { StoreCollection } from "./store-collection.ts"; interface StoreClass { new (): Store; } type DataDump = Pick, CollectionKeys>; type CollectionShapes = { -readonly [Key in keyof Store]: Store[Key] extends StoreCollection ? Shape[] : never; }; type CollectionKeys = { [Key in keyof Store]: Store[Key] extends StoreCollection ? Key : never; }[keyof Store]; export declare abstract class Store extends AbstractStore { #private; /** * **Do not call the constructor directly! Use {@link Store.create} instead.** * * The constructor cannot call the asynchronous {@link Store.initialize} method. * Therefore, you must use {@link Store.create} to properly create a new instance * of the store. * * @private */ constructor(); static create(this: StoreClass): Promise; protected initialize(): Promise; /** * Implements the {@link AbstractStore} protocol to interface with * {@link Factory|Factories}. This method should not be changed or used directly. * * Prefer using {@link Factory.seed} and {@link Factory.seedMany} to insert data * into the store. * * @private */ protected insert(identifier: symbol, entry: Shape): boolean; protected collection(factory: Factory): StoreCollection; reset(): Promise; dump(): DataDump; } export {}; //# sourceMappingURL=store.d.ts.map