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