import * as TE from "fp-ts/lib/TaskEither"; import { ConnectionRoutine, DatabasePool, TransactionFunction } from "slonik/dist/src/types"; import type { Config } from "../../config"; import type { Telemetry } from "../telemetry"; interface Dependencies { readonly config: Config; readonly telemetry: Telemetry; } export interface Database { readonly runInConnection: (callback: ConnectionRoutine) => TE.TaskEither; readonly runInTransaction: (callback: TransactionFunction) => TE.TaskEither; readonly end: () => TE.TaskEither; } export { DatabasePoolConnection } from "slonik"; export declare function createDatabase({ config, telemetry, }: Dependencies): TE.TaskEither; export declare function makeSlonikFunctionalWrapper(pool: DatabasePool): Database;