import { DestroyPlan, MapPlan, Plan, RecoveryPlan } from '@jamashita/genitore-plan'; export class CombinedChronoPlan implements Plan, D> { private readonly map: MapPlan>; private readonly recover: RecoveryPlan; private readonly destroy: DestroyPlan; public static of(map: MapPlan>, recover: RecoveryPlan, destroy: DestroyPlan): CombinedChronoPlan { return new CombinedChronoPlan(map, recover, destroy); } protected constructor(map: MapPlan>, recover: RecoveryPlan, destroy: DestroyPlan) { this.map = map; this.recover = recover; this.destroy = destroy; } public onDestroy(cause: unknown): unknown { return this.destroy.onDestroy(cause); } public onMap(value: Exclude): unknown { return this.map.onMap(value); } public onRecover(value: D): unknown { return this.recover.onRecover(value); } }