All files / lib/schema base-types.ts

91.66% Statements 11/12
90% Branches 9/10
100% Functions 2/2
91.66% Lines 11/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30          8x 8x 8x 8x 8x 8x 8x 8x     8x 12293x               12293x          
export interface Documented {
  /** A link to the AWS CloudFormation User Guide that provides informations about the entity. */
  Documentation?: string;
}
 
export enum PrimitiveType {
  String = 'String',
  Long = 'Long',
  Integer = 'Integer',
  Double = 'Double',
  Boolean = 'Boolean',
  Timestamp = 'Timestamp',
  Json = 'Json'
}
 
export function isPrimitiveType(str: string): str is PrimitiveType {
  switch (str) {
    case PrimitiveType.String:
    case PrimitiveType.Long:
    case PrimitiveType.Integer:
    case PrimitiveType.Double:
    case PrimitiveType.Boolean:
    case PrimitiveType.Timestamp:
    case PrimitiveType.Json:
      return true;
    default:
      return false;
  }
}