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

Method readEmbed

javascript/packages/core/lib/gen/ext.ts:125–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123 }
124
125 readEmbed() {
126 return new Proxy({}, {
127 get: (target, prop: string) => {
128 return (accessor: (expr: string) => string, ...args: string[]) => {
129 const name = this.scope.declare(
130 "ext_ser",
131 TypeId.isNamedType(this.typeInfo.typeId)
132 ? this.builder.typeResolver.getSerializerByName(CodecBuilder.replaceBackslashAndQuote(this.typeInfo.named!))
133 : this.builder.typeResolver.getSerializerById(this.typeInfo.typeId, this.typeInfo.userTypeId)
134 );
135 return accessor(`${name}.${prop}(${args.join(",")})`);
136 };
137 },
138 });
139 }
140
141 writeEmbed() {
142 return new Proxy({}, {

Callers

nothing calls this directly

Calls 5

declareMethod · 0.80
isNamedTypeMethod · 0.45
getSerializerByNameMethod · 0.45
getSerializerByIdMethod · 0.45

Tested by

no test coverage detected