How to use the @aws-cdk/cfnspec.schema.isUnionProperty function in @aws-cdk/cfnspec

To help you get started, we’ve selected a few @aws-cdk/cfnspec 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 / aws-cdk / tools / cfn2ts / lib / spec-utils.ts View on Github external
function complexScalarTypeNames(spec: schema.ScalarProperty): string[] {
  if (schema.isComplexProperty(spec) && !schema.isListProperty(spec) && !schema.isMapProperty(spec)) {
    return [spec.Type];
  } else if (schema.isUnionProperty(spec)) {
    return spec.Types || [];
  }
  return [];
}
github aws / aws-cdk / tools / cfn2ts / lib / spec-utils.ts View on Github external
function primitiveScalarTypeNames(spec: schema.ScalarProperty): string[] {
  if (schema.isPrimitiveProperty(spec)) {
    return [spec.PrimitiveType];
  } else if (schema.isUnionProperty(spec)) {
    return spec.PrimitiveTypes || [];
  }
  return [];
}
github aws / aws-cdk / tools / cfn2ts / lib / spec-utils.ts View on Github external
function primitiveItemTypeNames(spec: schema.CollectionProperty): string[] {
  if (schema.isPrimitiveListProperty(spec) || schema.isPrimitiveMapProperty(spec)) {
    return [spec.PrimitiveItemType];
  } else if (schema.isUnionProperty(spec)) {
    return spec.PrimitiveItemTypes || [];
  }
  return [];
}
github aws / aws-cdk / tools / cfn2ts / lib / spec-utils.ts View on Github external
function complexItemTypeNames(spec: schema.CollectionProperty): string[] {
  if (schema.isComplexListProperty(spec) || schema.isComplexMapProperty(spec)) {
    return [spec.ItemType];
  } else if (schema.isUnionProperty(spec)) {
    return spec.ItemTypes || [];
  }
  return [];
}