import { TASONSerializerOptions } from "./TASONSerializerOptions"; import type TASONTypeRegistry from "./TASONTypeRegistry"; import { TASONTypeInfo } from "./TASONTypeInfo"; import type { RuntimeSchemaAdapter } from "./schema/RuntimeSchemaAdapter"; /** * 序列化 Generator。 * ObjectType 成员上的 number Handling 对齐 C# `ValueScope` / `ObjectTypeProperty`: * 仅在 ObjectTypeInstance 写出路径内 `object-type-property` ≈ all。 * 有 schema 时结构 walk 对齐 C# 元数据驱动的属性写出。 */ export declare class TASONGenerator { private options; private registry; private indentLevel; /** ObjectTypeInstance 嵌套深度;>0 时 OTP 序列化按 all */ private objectTypeDepth; constructor(registry: TASONTypeRegistry, options: Required); generate(value: unknown): string; private handlingCtx; Value(value: unknown, scope?: "root" | "object-value"): string | undefined; NullValue(): string; BooleanValue(value: boolean): "true" | "false"; StringValue(value: string): string; NumberValue(value: number): string; BigIntValue(value: bigint): string; MaybeArrayValue(value: Iterable): string; ArrayValue(value: unknown[]): string; /** * 带 element schema 的数组写出(C# TypedArray 对称:每元素按期望类型)。 * 元素 kind 只解析一次;叶子数组热路径只做 mapRuntimeToTypeInstance。 */ ArrayValueWithSchema(value: unknown[], elementSchema: unknown, adapter: RuntimeSchemaAdapter): string; private isLeafRuntimeType; MaybeObjectValue(value: object): string; ObjectValue(obj: Record): string; /** * 带 schema 的 object 写出:叶子 + 数组/嵌套 object 递归(2.2)。 */ ObjectValueWithSchema(obj: Record, schema: unknown, adapter: RuntimeSchemaAdapter): string; /** * 按字段/元素 schema 写出单个值。 */ private emitValueWithSchema; private emitMappedField; Key(key: string): string; TypeInstanceValue(value: any, type: TASONTypeInfo & { name: string; }): string; private checkDepth; private indent; }