import { AnnotationLevel } from "./EntityProperty" ; import { IEdmType } from "./IEdmType" ; export class EdmInt32 implements IEdmType { public static validate ( value ) { if ( typeof value !== "number" ) { throw TypeError ( `Not a valid EdmInt32 string.` ) ; } return value ; } public typedValue : number ; public constructor ( public value ) { this . typedValue = EdmInt32 . validate ( value ) ; } public toJsonPropertyValuePair ( name ) { return [ name , this . typedValue ] ; } public toJsonPropertyValueString ( name ) { return `"${ name }":${ this . typedValue }` ; } public toJsonPropertyTypePair ( _name , _annotationLevel , _isSystemProperty ) { return ; } public toJsonPropertyTypeString ( _name , _annotationLevel , _isSystemProperty ) { return ; } }