/** * Collection Operator Rules * Enforces conventions for the collection callables seq, fan, fold, filter, acc. */ import type { ValidationRule } from '../types.js'; /** * Validates that break is not used in parallel operators (`fan`, `filter`). * * Break is semantically invalid in parallel execution contexts. It is valid in * sequential operators (`seq`, `acc`, `fold`). * * Error severity because this is semantically wrong, not just stylistic. */ export declare const BREAK_IN_PARALLEL: ValidationRule; /** * Suggests using `fan` over `seq` when no side effects are present. * * `fan` is semantically clearer for pure transformations: it signals no side * effects and may execute in parallel. * * Detects `seq` calls whose closure body contains no side-effecting operations * (host calls, logging). With 0.19.0, `seq` strictly has no accumulator * (`acc` is a separate callable), so the legacy accumulator-detection branch * is gone. */ export declare const PREFER_MAP: ValidationRule; /** * Suggests `fold` for final-only results, `acc` for running totals. * * - `fold(init, {body})` returns final accumulated value only * - `acc(init, {body})` returns list of all intermediate results * * Informational placeholder - real implementation requires flow analysis. */ export declare const FOLD_INTERMEDIATES: ValidationRule; /** * Validates that negation in `filter` uses grouped form. * * Grouped negation is clearer and prevents bugs: * - Correct: filter ({ !.empty }) -- grouped negation * - Wrong: filter ({ .empty }) -- filters for empty elements (likely bug) */ export declare const FILTER_NEGATION: ValidationRule; /** * Suggests using method shorthand over block form in collection operators. * * Block-wrapping a single method call is verbose: * - Verbose: fan({ $.upper() }) * - Preferred: fan(.upper) -- when supported * * Informational - both forms work identically. */ export declare const METHOD_SHORTHAND: ValidationRule;