curaflow/node_modules/@temporalio/common/lib/internal-non-workflow/tls-config.js

11 lines
476 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeTlsConfig = normalizeTlsConfig;
/**
* Normalize {@link TLSConfigOption} by turning false and null to undefined and true to and empty object
*/
function normalizeTlsConfig(tls, apiKey) {
tls = tls ?? (apiKey !== undefined ? true : undefined);
return typeof tls === 'object' ? (tls === null ? undefined : tls) : tls ? {} : undefined;
}
//# sourceMappingURL=tls-config.js.map