import { type ValidatorFn } from '@angular/forms'; import { type DfDataModel, type DfId } from '../../ng-draw-flow.interfaces'; import { type DfSignalValidator } from '../graph-validation.interfaces'; export interface DfCycleDetectionError { readonly hasCycle: true; readonly cycleNodes: readonly DfId[]; } /** Runs cycle detection without depending on an Angular form control. */ export declare function dfValidateCycles(model: DfDataModel | null | undefined): DfCycleDetectionError | null; /** * Validator for checking cycles in a graph * * ### Validation error shape * ```ts * { * hasCycle: true, * cycleNodes: DfId[] // array of nodeIds that form a cycle * } * ``` * @returns ValidatorFn that returns an error if a cycle is detected in the graph */ export declare function dfCycleDetectionValidator(): ValidatorFn; /** Creates a validator accepted directly by Signal Forms `validate()`. */ export declare function dfCycleDetectionSignalValidator(): DfSignalValidator;