import { ValidationRule, ValidationContext, ValidationSeverity } from '../interfaces'; /** * Options for ForbiddenLoopRule */ export interface ForbiddenLoopOptions { /** Whether to allow for loops */ allowFor?: boolean; /** Whether to allow while loops */ allowWhile?: boolean; /** Whether to allow do-while loops */ allowDoWhile?: boolean; /** Whether to allow for-of loops */ allowForOf?: boolean; /** Whether to allow for-in loops */ allowForIn?: boolean; /** Custom message */ message?: string; } /** * Rule that prevents usage of loop constructs * * Useful for sandboxed code execution where infinite loops could cause issues. * Can be configured to allow specific loop types. */ export declare class ForbiddenLoopRule implements ValidationRule { private options; readonly name = "forbidden-loop"; readonly description = "Prevents usage of loop constructs"; readonly defaultSeverity = ValidationSeverity.ERROR; readonly enabledByDefault = false; constructor(options?: ForbiddenLoopOptions); validate(context: ValidationContext): void; private reportLoop; }