()
| 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({}, { |
nothing calls this directly
no test coverage detected