Version1 /
DataTypesAccessor parameters, inputs, and outputs follow a principle called gradual typing. If the XML definition of the input or output includes no type attribute, then any JavaScript type is acceptable. At this extreme, types are only checked at run time. But an accessor may constrain the type of an input, output, or parameter by including a type field. The available types are still under discussion, but they will include at least:
For any of these data types except boolean, you can define a finite number of possible values (an enumeration), as in the following example: parameter('name', {'type':'string', 'value':'a', 'options':['a', 'b', 'c']}); Giving an options option defines the allowed values. Back to Accessor Specification |