UNPKG

@tucmc/hazel

Version:
22 lines (21 loc) 1.3 kB
import type { DataType } from '../../util/data/DataType'; import { DMap } from '../../util/data/DMap'; import type { DataChanges } from '../../util/data/DMapUtil'; import { ReferableMapEntity } from '../../util/data/ReferableEntity'; import { Collection } from '../../util/database/Collection'; import type { SimulatedDataPreset } from './SimulatedDataPresets'; export declare class SimulatedCollection<T extends DataType> extends Collection<T, DMap<string, T[keyof T]>, null> { private readonly simulatedContent; constructor(name: string, preset: SimulatedDataPreset<T>, instructor?: (simulated: DMap<string, T[keyof T]>) => void); protected handleChanges(changes: DataChanges[]): Promise<DataChanges[]>; protected initInstance(collectionName: string): null; protected retrieveCollection(): Promise<DMap<string, T[keyof T]>>; protected collectionMutator: (d: DMap<string, T[keyof T]>) => DataType; protected verifyChanges(changes: DataChanges[]): Promise<boolean>; private loadBuildCache; private saveBuildCache; private buildRef; readFromCache(autoFetch?: boolean): Promise<DMap<string, ReferableMapEntity<T[keyof T]>> | null>; fetch(): Promise<DMap<string, ReferableMapEntity<T[keyof T]>>>; fetchNoRef(): Promise<DMap<string, T[keyof T]>>; }