/// import type { Readable } from 'svelte/store'; import type { SvelteTask } from './task'; import type { SvelteRow } from './row'; import type { SvelteTimeRange } from './timeRange'; export interface EntityState { ids: K[]; entities: { [key: PropertyKey]: T; }; } interface EntityType { model: { id: K; }; hidden?: boolean; } export type EntityKey = string | number | symbol; export interface EntityStore extends Readable> { _update(updater: (value: EntityState) => EntityState): void; add(entity: T): void; addAll(entities: T[]): void; update(entity: T): void; upsert(entity: T): void; upsertAll(entities: T[]): void; delete(id: K): void; deleteAll(ids: K[]): void; refresh(): void; set(value: EntityState): void; entities?: Record; } export declare function all(store: EntityStore): Readable; export declare function where(store: EntityStore, filterFn: (value: T) => boolean): Readable; export declare function createDataStore(): { taskStore: EntityStore; rowStore: EntityStore; timeRangeStore: EntityStore; allTasks: Readable; allRows: Readable; allTimeRanges: Readable; rowTaskCache: Readable<{}>; }; export type GanttDataStore = ReturnType; export {};