MCPcopy Create free account
hub / github.com/apache/fory / readWithDepth

Function readWithDepth

javascript/packages/core/lib/gen/serializer.ts:191–200  ·  view source on GitHub ↗
(assignStmt: (v: string) => string, refState: string)

Source from the content-addressed store, hash-verified

189 abstract read(assignStmt: (v: string) => string, refState: string): string;
190
191 readWithDepth(assignStmt: (v: string) => string, refState: string): string {
192 const result = this.scope.uniqueName("result");
193 return `
194 ${this.builder.getReadContextName()}.incReadDepth();
195 let ${result};
196 ${this.read(v => `${result} = ${v}`, refState)};
197 ${this.builder.getReadContextName()}.decReadDepth();
198 ${assignStmt(result)};
199 `;
200 }
201
202 readTypeInfo(): string {
203 const typeId = this.getTypeId();

Callers

nothing calls this directly

Calls 3

uniqueNameMethod · 0.80
getReadContextNameMethod · 0.80
readMethod · 0.65

Tested by

no test coverage detected