"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/* tslint:disable no-null-keyword */
class Util {
    static objectAssign(target, ...varArgs) {
        if (target == null) { // TypeError if undefined or null
            throw new TypeError("Cannot convert undefined or null to object");
        }
        const to = Object(target);
        for (let index = 1; index < arguments.length; index++) {
            const nextSource = arguments[index];
            if (nextSource != null) { // Skip over if undefined or null
                for (const nextKey in nextSource) {
                    // Avoid bugs when hasOwnProperty is shadowed
                    if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
                        to[nextKey] = nextSource[nextKey];
                    }
                }
            }
        }
        return to;
    }
}
Util.definedOrThrow = (input, error = new Error("Undefined (Util.definedOrThrow)")) => {
    if (input)
        return input;
    else
        throw error;
};
exports.Util = Util;
function d(input) {
    if (typeof input !== "undefined")
        return input;
    else
        throw new Error("Input value is undefined (d() fn)");
}
exports.d = d;
//# sourceMappingURL=util.js.map