import { Provider, ValueOrPromise } from '@loopback/core'; import { AnyObject, juggler } from '@loopback/repository'; import { DatasourceProviderFn } from 'loopback4-dynamic-datasource'; import { DataSourceConfigProviderFn, DynamicDatasourceConfig } from '../types'; /** * this provider returns a property with an async function, * this function returns a juggler datasource based on the config value * the property name will be the one used in the repository for datasource injection */ export declare class DatasourceProvider implements Provider { private readonly configProvider; private readonly config; constructor(configProvider: DataSourceConfigProviderFn, config: DynamicDatasourceConfig); value(): ValueOrPromise; combineArraysIntoObject(keys: string[], configs: AnyObject[]): Promise<{ [key: string]: () => Promise; }>; createDatasource(config: AnyObject): Promise; }