How to use the jsii-reflect.OptionalValue function in jsii-reflect

To help you get started, we’ve selected a few jsii-reflect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / jsii / packages / jsii-diff / lib / classes-ifaces.ts View on Github external
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(', ')}`;

}
github aws / jsii / packages / jsii-diff / lib / classes-ifaces.ts View on Github external
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(', ')}`;

}