export interface HasExprBranch { feature: string; then: HasExprNode; else: HasExprNode; } /** A module id, `null` for an empty branch, or a conditional. */ export type HasExprNode = string | null | HasExprBranch; /** @param expr e.g. `foo?./a:./b` */ export declare function parseHasExpr(expr: string): HasExprNode; /** * Collapses branches whose feature has a build-time value. * @returns the same node shape, with resolved branches inlined. */ export declare function reduceHasExpr(node: HasExprNode, features: Record, coerceUndefinedToFalse?: boolean): HasExprNode; /** All module ids referenced by a (reduced) expression tree. */ export declare function hasExprMids(node: HasExprNode): string[]; /** Canonical string form, used to build the absMid of a runtime-resolved has module. */ export declare function stringifyHasExpr(node: HasExprNode, mapMid?: (mid: string) => string): string;