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

Function write

javascript/packages/core/lib/gen/collection.ts:565–572  ·  view source on GitHub ↗
(accessor: string)

Source from the content-addressed store, hash-verified

563 }
564
565 write(accessor: string): string {
566 if (this.isAny()) {
567 return `
568 new (${this.builder.getExternal(CollectionAnySerializer.name)})(${this.builder.getWriteContextName()}, ${this.builder.getReadContextName()}).write(${accessor}, ${accessor}.${this.sizeProp()})
569 `;
570 }
571 return this.writeSpecificType(accessor);
572 }
573
574 read(accessor: (expr: string) => string, refState: string): string {
575 if (this.isAny()) {

Callers

nothing calls this directly

Calls 6

isAnyMethod · 0.80
getWriteContextNameMethod · 0.80
getReadContextNameMethod · 0.80
writeSpecificTypeMethod · 0.80
getExternalMethod · 0.45
sizePropMethod · 0.45

Tested by

no test coverage detected