anonymous.js 577 B

1234567891011121314151617181920212223
  1. import { Coder } from "./abstract-coder.js";
  2. /**
  3. * Clones the functionality of an existing Coder, but without a localName
  4. *
  5. * @_ignore
  6. */
  7. export class AnonymousCoder extends Coder {
  8. coder;
  9. constructor(coder) {
  10. super(coder.name, coder.type, "_", coder.dynamic);
  11. this.coder = coder;
  12. }
  13. defaultValue() {
  14. return this.coder.defaultValue();
  15. }
  16. encode(writer, value) {
  17. return this.coder.encode(writer, value);
  18. }
  19. decode(reader) {
  20. return this.coder.decode(reader);
  21. }
  22. }
  23. //# sourceMappingURL=anonymous.js.map