import type { RuntimeType } from "./RuntimeType"; import type { SerializeNumberHandling } from "../TASONSerializerOptions"; import { isSafeIntegerBigInt, type NumberHandlingContext } from "../types/NumberHandling"; /** 序列化叶子映射结果:字面量文本,或 TypeInstance 的类型名 + 标量参数 */ export type RuntimeSerializeForm = { form: "literal"; text: string; } | { form: "type-instance"; typeName: string; scalarArg: string; } | { form: "passthrough"; value: unknown; }; /** * 按期望 RuntimeType + serialize Handling 决定写出形式。 * RuntimeType → 多种 TypeInstance/字面量 的默认路径选择。 * @param ctx 可选;`inObjectType` 使 object-type-property 在 OT 内按 all 解析 */ export declare function mapRuntimeToTypeInstance(runtimeType: RuntimeType, value: unknown, serializeHandling: SerializeNumberHandling, ctx?: NumberHandlingContext): RuntimeSerializeForm; /** 是否为安全整数 bigint(供测试/外部使用) */ export { isSafeIntegerBigInt };