3e255003cff2ac0a5e968015e8fc1a4aeeac844c8e6e17bf084a888b0d1a86b40bd3379bcd08b614549940d12b5fa0e433ea51297c1cbe3e42d5cd46d1969d 741 B

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = inherits;
  6. var _index = require("../constants/index.js");
  7. var _inheritsComments = require("../comments/inheritsComments.js");
  8. function inherits(child, parent) {
  9. if (!child || !parent) return child;
  10. for (const key of _index.INHERIT_KEYS.optional) {
  11. if (child[key] == null) {
  12. child[key] = parent[key];
  13. }
  14. }
  15. for (const key of Object.keys(parent)) {
  16. if (key[0] === "_" && key !== "__clone") {
  17. child[key] = parent[key];
  18. }
  19. }
  20. for (const key of _index.INHERIT_KEYS.force) {
  21. child[key] = parent[key];
  22. }
  23. (0, _inheritsComments.default)(child, parent);
  24. return child;
  25. }
  26. //# sourceMappingURL=inherits.js.map