roots.js 455 B

123456789101112131415161718
  1. "use strict";
  2. module.exports = {};
  3. /**
  4. * Named roots.
  5. * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).
  6. * Can also be used manually to make roots available accross modules.
  7. * @name roots
  8. * @type {Object.<string,Root>}
  9. * @example
  10. * // pbjs -r myroot -o compiled.js ...
  11. *
  12. * // in another module:
  13. * require("./compiled.js");
  14. *
  15. * // in any subsequent module:
  16. * var root = protobuf.roots["myroot"];
  17. */