/** * `-> type` conversion helpers * * Converts the pipe value to a target type according to the compatibility * matrix. Used by `-> type` (bare type keyword), `-> type(...)` (parameterized * type constructor), and `-> $var` when `$var` is bound to a type value. * * Compatibility matrix: * | Source | list | dict | tuple | ordered(sig) | number | string | bool | * |---------|--------|--------|---------|----------------|-----------------|----------|---------------------| * | list | no-op | error | valid | error | error | valid | error | * | dict | error | no-op | error | valid | error | valid | error | * | tuple | valid | error | no-op | error | error | valid | error | * | ordered | error | valid | error | no-op | error | valid | error | * | string | error | error | error | error | valid | no-op | valid("true"|"false")| * | number | error | error | error | error | no-op | valid | valid(0 or 1) | * | bool | error | error | error | error | error | valid | no-op | * * Error Contracts: * - RILL-R036: Incompatible source/target type * - RILL-R037: dict -> ordered without structural signature * - RILL-R038: Non-parseable string to number * * @internal */ import type { ASTNode, TypeConstructorNode } from '../../../../types.js'; import type { RillValue } from '../../types/structures.js'; import type { EvalState } from '../state.js'; import type { RillTypeName } from '../../../../types.js'; /** * Apply conversion for a parameterized type constructor target * (`-> list(T)`, `-> dict(...)`, `-> ordered(...)`, `-> tuple(...)`, ...). * * Handles the uniform vs structural dispatch and delegates to the * structural conversion helpers for dict/ordered/tuple with fields. */ export declare function applyConstructorConversion(s: EvalState, input: RillValue, typeRef: TypeConstructorNode, node: ASTNode): Promise; /** * Apply conversion from source value to target type name. * Dispatches to protocol.convertTo on the source type's registration. * * Replaces the hardcoded conversion matrix with protocol dispatch. * * Special cases preserved: * - Same type = no-op (short-circuit) * - dict -> :>ordered without structural sig raises RILL-R037 * - String-to-number parse failure raises RILL-R038 * - Missing convertTo target raises RILL-R036 */ export declare function applyConversion(s: EvalState, input: RillValue, targetType: RillTypeName, node: ASTNode): RillValue;