All files / lib/schema base-types.ts

91.67% Statements 11/12
90% Branches 9/10
100% Functions 2/2
91.67% 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          1x 1x 1x 1x 1x 1x 1x 1x     1x 3186x               3186x          
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;
    }
}