UNPKG

@shapediver/sdk.sdtf-v1

Version:
38 lines 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SdtfPartialNode = void 0; const SdtfBasePartialComponent_1 = require("./SdtfBasePartialComponent"); class SdtfPartialNode extends SdtfBasePartialComponent_1.SdtfBasePartialComponent { constructor() { super(...arguments); this.items = []; this.nodes = []; this.additionalProperties = {}; } toJson() { const json = Object.assign({}, this.additionalProperties); if (this.attributes !== undefined) json.attributes = this.attributes; else delete json.attributes; if (this.items.length > 0) json.items = this.items; else delete json.items; if (this.name !== undefined) json.name = this.name; else delete json.name; if (this.nodes.length > 0) json.nodes = this.nodes; else delete json.nodes; if (this.typeHint !== undefined) json.typeHint = this.typeHint; else delete json.typeHint; return json; } } exports.SdtfPartialNode = SdtfPartialNode; //# sourceMappingURL=SdtfPartialNode.js.map