enum DataType { String = 'String' , Number = 'Number' , ListOfNumbers = 'List<Number>' , CommaDelimitedList = 'CommaDelimitedList' } export default DataType ; export class IntrinsicFunction { constructor ( private name , private payload ) { } toJSON ( ) { return { [ this . name ] : this . payload } ; } } export class ConditionIntrinsicFunction extends IntrinsicFunction { constructor ( name , payload ) { super ( name , payload ) ; } } export type Value < T > = T | IntrinsicFunction ; export type List < T > = T [ ] | IntrinsicFunction ; export type Condition = ConditionIntrinsicFunction | { Condition : Value < string > ; } ;