@casual-simulation/aux-common
Version:
Common library for AUX projects
20 lines • 1.06 kB
TypeScript
import type { PartitionConfig } from './AuxPartitionConfig';
import type { AuxPartition } from './AuxPartition';
import type { PartitionAuthSource } from './PartitionAuthSource';
export interface AuxPartitionServices {
/**
* The auth source that should be used for the partition, if needed.
*/
authSource: PartitionAuthSource;
}
export type AuxPartitionFactory = (config: PartitionConfig, services: AuxPartitionServices) => Promise<AuxPartition> | AuxPartition;
/**
* Creates an AUX Partition from the given list of factory functions.
* The first factory function that returns a partition is the partition
* that gets returned.
* @param config The config which indicates the type of partition to create.
* @param services The services which should be used by the partitions.
* @param factories The factory functions.
*/
export declare function createAuxPartition(config: PartitionConfig, services: AuxPartitionServices, ...factories: AuxPartitionFactory[]): Promise<AuxPartition>;
//# sourceMappingURL=AuxPartitionFactories.d.ts.map