import type { DataSourceAspect } from './DataSourceAspect'; import type { AnyRequest, Request } from './Request'; import type { Chunk } from '@principia/base/Chunk'; import type * as M from '@principia/base/Maybe'; import type { _A, _E } from '@principia/base/prelude'; import * as E from '@principia/base/Either'; import * as I from '@principia/base/IO'; import * as St from '@principia/base/Structural'; import { CompletedRequestMap } from './CompletedRequestMap'; import { Described } from './Described'; export declare const DataSourceTypeId: unique symbol; export declare type DataSourceTypeId = typeof DataSourceTypeId; export declare class DataSource implements St.Equatable, St.Hashable { readonly identifier: string; readonly runAll: (requests: Chunk>) => I.IO; readonly [DataSourceTypeId]: DataSourceTypeId; constructor(identifier: string, runAll: (requests: Chunk>) => I.IO); [St.$equals](that: unknown): boolean; get [St.$hash](): number; } export declare function isDataSource(u: unknown): u is DataSource; export declare function batchN_(dataSource: DataSource, n: number): DataSource; export declare function contramapIO_(dataSource: DataSource, f: Described<(b: B) => I.IO>): DataSource; export declare function eitherWith_(ds1: DataSource, ds2: DataSource, f: Described<(c: C) => E.Either>): DataSource; export declare function equals(ds1: DataSource, ds2: DataSource): boolean; export declare function gives_(ds: DataSource, f: Described<(r0: R0) => R>): DataSource; export declare function giveAll_(ds: DataSource, r: Described): DataSource; export declare function race_(ds1: DataSource, ds2: DataSource): DataSource; export declare class Batched extends DataSource { readonly identifier: string; readonly run: (requests: Chunk) => I.IO; constructor(identifier: string, run: (requests: Chunk) => I.IO); } export declare function makeBatched(name: string, f: (requests: Chunk) => I.IO): Batched; export declare function fromFunction>(name: string, f: (a: A) => _A): DataSource; export declare function fromFunctionIOBatched(name: string, f: (a: Chunk) => I.IO, Chunk<_A>>): DataSource; export declare function fromFunctionBatched>(name: string, f: (a: Chunk) => Chunk<_A>): DataSource; export declare function fromFunctionIOBatchedOption(name: string, f: (a: Chunk) => I.IO, Chunk>>>): DataSource; export declare function fromFunctionBatchedOption>(name: string, f: (a: Chunk) => Chunk>>): DataSource; export declare function fromFunctionIOBatchedWith(name: string, f: (a: Chunk) => I.IO, Chunk<_A>>, g: (b: _A) => A): DataSource; export declare function fromFunctionBatchedWith>(name: string, f: (a: Chunk) => Chunk<_A>, g: (b: _A) => A): DataSource; export declare function fromFunctionIO(name: string, f: (a: A) => I.IO, _A>): DataSource; export declare function fromFunctionIOOption(name: string, f: (a: A) => I.IO, M.Maybe<_A>>): DataSource; export declare function fromFunctionOption>(name: string, f: (a: A) => M.Maybe<_A>): DataSource; export declare function applyAspect_(dataSource: DataSource, aspect: DataSourceAspect): DataSource; export declare const never: DataSource; //# sourceMappingURL=DataSource.d.ts.map