1 | "use strict";
|
2 | var __assign = (this && this.__assign) || function () {
|
3 | __assign = Object.assign || function(t) {
|
4 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5 | s = arguments[i];
|
6 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7 | t[p] = s[p];
|
8 | }
|
9 | return t;
|
10 | };
|
11 | return __assign.apply(this, arguments);
|
12 | };
|
13 | Object.defineProperty(exports, "__esModule", { value: true });
|
14 | exports.createComplexType = void 0;
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | function createComplexType(json, converters) {
|
22 | return Object.entries(json).reduce(function (complexTypeInstance, _a) {
|
23 | var jsonKey = _a[0], jsonValue = _a[1];
|
24 | return (__assign(__assign({}, complexTypeInstance), converters[jsonKey](jsonValue)));
|
25 | }, {});
|
26 | }
|
27 | exports.createComplexType = createComplexType;
|
28 |
|
\ | No newline at end of file |