import { types as t } from "@marko/compiler"; import { type Binding, type ParamBinding, type ReferencedBindings } from "./bindings"; import { type Opt, type SortedOneMany } from "./optional"; import { type ParamReasonGroups, type Section } from "./sections"; import { type Slot } from "./slots"; import { type Sources } from "./sources"; export type Reasons = SortedOneMany; export type Reason = Sources; export declare function addReason(slot: Slot, reason: undefined | false | Reason): void; export declare function addAlwaysReason(binding: Binding): void; export declare function addReasonExprs(slot: Slot, expr: Opt): void; export declare function addOwnerReason(from: Section, to: Section, reason: undefined | false | Reason): void; export declare function mapBodyParams(section: Section, reason: undefined | Reason, seen?: Set): Reason | undefined; export declare function isGuardedReason(reason: undefined | Reason): reason is Sources & { state: undefined; always: undefined; }; export declare function isStateReason(reason: undefined | Reason): reason is Sources; export declare function getSourcesForExpr(expr: t.NodeExtra): Sources | undefined; export declare function getSourcesForExprs(exprs: Opt | boolean): Sources | undefined; export declare function getSourcesForRef(ref: ReferencedBindings): Sources | undefined; export declare function getSourcesForDerived({ binding, exprs, properties, }: NonNullable): Sources | undefined; export declare function mapParamReason(program: Section, reason: Sources, exprs: KnownExprs | undefined, ownParams: boolean): Reason | undefined; export interface KnownExprs { known?: Record; value?: t.NodeExtra; } export declare function mapParamReasonToExpr(exprs: KnownExprs, reason: Opt): Opt; export declare function mapParamReasonToExpr(exprs: KnownExprs, reason: boolean | Opt): Opt | true; export declare function mapParamBindingToExpr(exprs: KnownExprs, binding: ParamBinding): Opt; export declare function getKnownExprsAt(exprs: KnownExprs, binding: Binding): KnownExprs; export declare function applyReasonExprs(section: Section): void; export declare function mergeSlotReasons(section: Section): void; export declare function getNodeReasons(section: Section): Sources | import("./optional").SortedMany | undefined; export declare function getReasonsVersion(): number; export declare function setParamReasonGroups(section: Section, groups: ParamReasonGroups): void;