Allow explicit control over actor ID uniqueness in project scheduling state resolution
This commit is contained in:
@@ -484,11 +484,14 @@ export function resolveRuntimeProjectScheduleState(options: {
|
|||||||
scheduler: ProjectScheduler;
|
scheduler: ProjectScheduler;
|
||||||
sequences: ProjectSequenceLibrary;
|
sequences: ProjectSequenceLibrary;
|
||||||
actorIds: string[];
|
actorIds: string[];
|
||||||
|
actorIdsAreUnique?: boolean;
|
||||||
dayNumber: number;
|
dayNumber: number;
|
||||||
timeOfDayHours: number;
|
timeOfDayHours: number;
|
||||||
pathsById?: ReadonlyMap<string, RuntimeProjectSchedulePathDefinition>;
|
pathsById?: ReadonlyMap<string, RuntimeProjectSchedulePathDefinition>;
|
||||||
}): RuntimeResolvedProjectScheduleState {
|
}): RuntimeResolvedProjectScheduleState {
|
||||||
const actorIds = [...new Set(options.actorIds)];
|
const actorIds = options.actorIdsAreUnique
|
||||||
|
? options.actorIds
|
||||||
|
: [...new Set(options.actorIds)];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
actors: actorIds.map((actorId) =>
|
actors: actorIds.map((actorId) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user