import type { CommonCacheConfig } from './AbstractCache'; import { AbstractFlatCache } from './AbstractFlatCache'; import type { InMemoryCacheConfiguration } from './memory/InMemoryCache'; import type { InMemoryGroupCacheConfiguration } from './memory/InMemoryGroupCache'; import type { GroupNotificationPublisher } from './notifications/GroupNotificationPublisher'; import type { NotificationPublisher } from './notifications/NotificationPublisher'; import type { Cache, DataSource, GroupCache } from './types/DataSources'; import type { GetManyResult, SynchronousCache, SynchronousGroupCache } from './types/SyncDataSources'; export type LoaderConfig | GroupCache = Cache, DataSourceType = DataSource, InMemoryCacheConfigType extends InMemoryCacheConfiguration | InMemoryGroupCacheConfiguration = InMemoryCacheConfiguration, InMemoryCacheType extends SynchronousCache | SynchronousGroupCache = SynchronousCache, NotificationPublisherType extends NotificationPublisher | GroupNotificationPublisher = NotificationPublisher> = { dataSources?: readonly DataSourceType[]; dataSourceGetOneFn?: (loadParams: LoadParams) => Promise; dataSourceGetManyFn?: (keys: string[], loadParams?: LoadManyParams) => Promise; dataSourceName?: string; throwIfLoadError?: boolean; throwIfUnresolved?: boolean; } & CommonCacheConfig; export declare class Loader extends AbstractFlatCache { private readonly dataSources; private readonly isKeyRefreshing; protected readonly throwIfLoadError: boolean; protected readonly throwIfUnresolved: boolean; constructor(config: LoaderConfig>); forceSetValue(key: string, newValue: LoadedValue | null): Promise; forceRefresh(loadParams: LoadParams): Promise; protected resolveValue(key: string, loadParams: LoadParams): Promise; private loadFromLoaders; protected resolveManyValues(keys: string[], loadParams: LoadManyParams): Promise>; private loadManyFromLoaders; }