2022-09-05 16:57:11 -04:00
|
|
|
import { Coder } from "./abstract-coder.js";
|
2022-11-30 15:44:23 -05:00
|
|
|
/**
|
|
|
|
* Clones the functionality of an existing Coder, but without a localName
|
|
|
|
*
|
|
|
|
* @_ignore
|
|
|
|
*/
|
2022-09-05 16:57:11 -04:00
|
|
|
export class AnonymousCoder extends Coder {
|
|
|
|
coder;
|
|
|
|
constructor(coder) {
|
|
|
|
super(coder.name, coder.type, "_", coder.dynamic);
|
|
|
|
this.coder = coder;
|
|
|
|
}
|
|
|
|
defaultValue() {
|
|
|
|
return this.coder.defaultValue();
|
|
|
|
}
|
|
|
|
encode(writer, value) {
|
|
|
|
return this.coder.encode(writer, value);
|
|
|
|
}
|
|
|
|
decode(reader) {
|
|
|
|
return this.coder.decode(reader);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//# sourceMappingURL=anonymous.js.map
|