@temporalio/common
Version:
Common library for code that's used across the Client, Worker, and/or Workflow
11 lines • 476 B
JavaScript
;
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