Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function describeOptionalValueMatchingFailure(origType: reflect.OptionalValue, updatedType: reflect.OptionalValue, analysis: FailedAnalysis) {
const origDescr = reflect.OptionalValue.describe(origType);
const updaDescr = reflect.OptionalValue.describe(updatedType);
if (origDescr !== updaDescr) {
return `${updaDescr} (formerly ${origDescr}): ${analysis.reasons.join(', ')}`;
}
return `${updaDescr}: ${analysis.reasons.join(', ')}`;
}
function describeOptionalValueMatchingFailure(origType: reflect.OptionalValue, updatedType: reflect.OptionalValue, analysis: FailedAnalysis) {
const origDescr = reflect.OptionalValue.describe(origType);
const updaDescr = reflect.OptionalValue.describe(updatedType);
if (origDescr !== updaDescr) {
return `${updaDescr} (formerly ${origDescr}): ${analysis.reasons.join(', ')}`;
}
return `${updaDescr}: ${analysis.reasons.join(', ')}`;
}