import type { LintMessageWithFile } from "../types/index.js"; /** * Structurally-typed interfaces compatible with shell RuleLevelMap. * Using structural typing avoids core -> shell dependency. */ export interface RuleLevel { readonly level: number; readonly name: string; } export interface RuleLevelMapLike { readonly explicitRules: ReadonlyMap; readonly allLevel?: RuleLevel; } /** * Get rule id from lint message in a pure, cross-source way. * * @pure true * @invariant m.source ∈ {typescript, eslint, biome} (guaranteed by type system) * @complexity O(1) */ export declare function ruleIdOfCore(m: LintMessageWithFile): string; /** * Compute numeric priority level for a message using provided mapping. * * @pure true * @invariant result ∈ [0, 5] * @complexity O(1) - Map lookup * @default 2 (error) if not mapped */ export declare function getPriorityLevel(m: LintMessageWithFile, ruleLevelMap: RuleLevelMapLike | null): number; /** * Compute human-readable priority name for a message using provided mapping. * * @pure true * @invariant result.length > 0 * @complexity O(1) - Map lookup * @default "Critical Compiler Errors" if not mapped */ export declare function getPriorityName(m: LintMessageWithFile, ruleLevelMap: RuleLevelMapLike | null): string; /** * Group messages by numeric level using pipe for composability. * * @pure true * @invariant result.size <= messages.length * @complexity O(n) где n = messages.length * * @example * ```ts * import { pipe } from "effect"; * * const grouped = groupByLevel(messages, config); * // Uses pipe internally for functional composition * ``` */ export declare function groupByLevel(messages: readonly LintMessageWithFile[], ruleLevelMap: RuleLevelMapLike | null): Map; /** * Group top messages (first 15) by section name using pipe. * * @pure true * @invariant result.size <= 15 * @complexity O(min(n, 15)) где n = messages.length * * @example * ```ts * // Functional composition with pipe * const sections = pipe( * messages, * msgs => msgs.slice(0, 15), * msgs => groupBySections(msgs, config) * ); * ``` */ export declare const groupBySections: (messages: readonly LintMessageWithFile[], ruleLevelMap: RuleLevelMapLike | null) => Map; //# sourceMappingURL=priority.d.ts.map