import type { AllDestinations } from './destination-accessor-types'; import type { Destination } from './destination-service-types'; /** * Function to implement the selection strategy of the retrieved destination. * Use the built-in strategies defined in {@link DestinationSelectionStrategies} or make your own function. */ export type DestinationSelectionStrategy = (allDestinations: AllDestinations, destinationName: string) => Destination | null; /** * Constraints the selection to provider destinations. * @param allDestinations - Retrieved destinations. * @param destinationName - Name of the destination to retrieve. * @returns The destination to retrieve, returns `null`, if no matched provider destination is found. */ export declare function alwaysProvider(allDestinations: AllDestinations, destinationName: string): Destination | null; /** * Constraints the selection to subscriber destinations. * @param allDestinations - Retrieved destinations. * @param destinationName - Name of the destination to retrieve. * @returns The destination to retrieve, returns `null`, if no matched subscriber destination is found. */ export declare function alwaysSubscriber(allDestinations: AllDestinations, destinationName: string): Destination | null; /** * Prioritizes the selection of subscriber destinations. * @param allDestinations - Retrieved destinations. * @param destinationName - Name of the destination to retrieve. * @returns The destination to retrieve, returns `null` if no matched destination is found. */ export declare function subscriberFirst(allDestinations: AllDestinations, destinationName: string): Destination | null; /** * Selector of destination selection strategies. See {@link alwaysProvider}, {@link alwaysSubscriber} and {@link subscriberFirst} for more information available selection strategies. */ export declare const DestinationSelectionStrategies: { alwaysProvider: typeof alwaysProvider; alwaysSubscriber: typeof alwaysSubscriber; subscriberFirst: typeof subscriberFirst; };