import { Effect } from "effect"; import type { SuggestionWithScore } from "../types/domain-types.js"; /** * Pure computation effect for finding similar candidates * * @param userInput - User's typed string * @param candidates - Available candidates * @returns Effect with top suggestions * * @pure true * @purity CORE * @effect Effect * @invariant result.length ≤ MAX_SUGGESTIONS * @invariant ∀i < result.length-1: result[i].score ≥ result[i+1].score * @invariant ∀x ∈ result: x.score ≥ MIN_SIMILARITY_SCORE * @complexity O(n log n) where n = |candidates| * @throws Never - все ошибки типизированы в Effect * * FORMAT THEOREM: ∀input,candidates: Effect.succeed(findSimilar(input, candidates)) */ export declare const findSimilarCandidatesEffect: (userInput: string, candidates: readonly string[]) => Effect.Effect; /** * Pure validation effect for candidate filtering * * @param candidate - Candidate name * @param userInput - User input * @returns Effect with validation result * * @pure true * @purity CORE * @effect Effect * @invariant ∀c,u: isValidCandidate(c,u) ∈ {true, false} * @complexity O(1) * @throws Never */ export declare const isValidCandidateEffect: (candidate: string, userInput: string) => Effect.Effect; /** * Pure message formatting effect * * @param propertyName - Invalid property name * @param suggestions - Scored suggestions * @returns Effect with formatted message * * @pure true * @purity CORE * @effect Effect * @complexity O(n) where n = |suggestions| * @throws Never */ export declare const formatSuggestionMessageEffect: (propertyName: string, suggestions: readonly SuggestionWithScore[]) => Effect.Effect; //# sourceMappingURL=index.d.ts.map