"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const dynamo_easy_config_1 = require("./dynamo-easy-config");
function updateDynamoEasyConfig(config) {
    if (config.logReceiver !== undefined && typeof config.logReceiver !== 'function') {
        throw new Error('Config.logReceiver has to be a function');
    }
    if (config.dateMapper !== undefined && (config.dateMapper === null || typeof config.dateMapper.toDb !== 'function' || typeof config.dateMapper.fromDb !== 'function')) {
        throw new Error('Config.dateMapper must be an object of type MapperForType');
    }
    if (config.tableNameResolver !== undefined && (config.tableNameResolver === null || typeof config.tableNameResolver !== 'function')) {
        throw new Error('Config.tableNameResolver must be function');
    }
    if (config.sessionValidityEnsurer !== undefined && (config.sessionValidityEnsurer === null || typeof config.sessionValidityEnsurer !== 'function')) {
        throw new Error('Config.sessionValidityEnsurer must be function');
    }
    Object.assign(dynamo_easy_config_1.dynamoEasyConfig, config);
}
exports.updateDynamoEasyConfig = updateDynamoEasyConfig;
//# sourceMappingURL=update-config.function.js.map