2019-08-25 09:39:20 +03:00
|
|
|
"use strict";
|
|
|
|
import { Coder } from "./abstract-coder";
|
|
|
|
// Clones the functionality of an existing Coder, but without a localName
|
|
|
|
export class AnonymousCoder extends Coder {
|
|
|
|
constructor(coder) {
|
|
|
|
super(coder.name, coder.type, undefined, coder.dynamic);
|
|
|
|
this.coder = coder;
|
|
|
|
}
|
2020-11-23 11:43:28 +03:00
|
|
|
defaultValue() {
|
|
|
|
return this.coder.defaultValue();
|
|
|
|
}
|
2019-08-25 09:39:20 +03:00
|
|
|
encode(writer, value) {
|
|
|
|
return this.coder.encode(writer, value);
|
|
|
|
}
|
|
|
|
decode(reader) {
|
|
|
|
return this.coder.decode(reader);
|
|
|
|
}
|
|
|
|
}
|
2020-07-13 15:03:56 +03:00
|
|
|
//# sourceMappingURL=anonymous.js.map
|