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

Function writeRef

javascript/packages/core/lib/gen/serializer.ts:114–123  ·  view source on GitHub ↗
(accessor: string)

Source from the content-addressed store, hash-verified

112 }
113
114 writeRef(accessor: string) {
115 const noneedWrite = this.scope.uniqueName("noneedWrite");
116 return `
117 let ${noneedWrite} = false;
118 ${this.writeRefOrNull(accessor, expr => `${noneedWrite} = ${expr}`)}
119 if (!${noneedWrite}) {
120 ${this.writeNoRef(accessor)}
121 }
122 `;
123 }
124
125 writeNoRef(accessor: string) {
126 return `

Callers

nothing calls this directly

Calls 3

uniqueNameMethod · 0.80
writeNoRefMethod · 0.80
writeRefOrNullMethod · 0.65

Tested by

no test coverage detected