Skip to content

Enumerable strings to unions #86

@johngeorgewright

Description

@johngeorgewright

I'd like to suggest that enumerable strings be converted to unions.

For example:

<!-- ... -->
<element maxOccurs="1" minOccurs="0" name="adUnitView" type="tns:AdUnitView"/>
<!-- ... -->
<simpleType name="AdUnitView">
  <restriction base="xsd:string">
    <enumeration value="TOP_LEVEL"/>
    <enumeration value="FLAT"/>
    <enumeration value="HIERARCHICAL"/>
  </restriction>
</simpleType>

Would become:

  /** AdUnitView|xsd:string */
  adUnitView?: 'TOP_LEVEL' | 'FLAT' | 'HIERARCHICAL'

Rather than the current implementation:

  /** AdUnitView|xsd:string|TOP_LEVEL,FLAT,HIERARCHICAL */
  adUnitView?: string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions