attributes attributes : Merge < { averageMeasuredValue : Attribute < null | number , any > & { isConditional : true ; mandatoryIf : [ ] | [ { averageMeasurement : boolean ; } ] ; optional : true ; optionalIf : [ ] | ConditionalFeatureList < BitSchema > ; } ; averageMeasuredValueWindow : Attribute < number , any > & { isConditional : true ; mandatoryIf : [ ] | [ { averageMeasurement : boolean ; } ] ; optional : true ; optionalIf : [ ] | ConditionalFeatureList < BitSchema > ; } ; levelValue : Attribute < ConcentrationMeasurement . LevelValue , any > & { isConditional : true ; mandatoryIf : [ ] | [ { levelIndication : boolean ; } ] ; optional : true ; optionalIf : [ ] | ConditionalFeatureList < BitSchema > ; } ; maxMeasuredValue : Attribute < null | number , any > & { isConditional : true ; mandatoryIf : [ ] | [ { numericMeasurement : boolean ; } ] ; optional : true ; optionalIf : [ ] | ConditionalFeatureList < BitSchema > ; } ; measuredValue : Attribute < null | number , any > & { isConditional : true ; mandatoryIf : [ ] | [ { numericMeasurement : boolean ; } ] ; optional : true ; optionalIf : [ ] | ConditionalFeatureList < BitSchema > ; } ; measurementMedium : FixedAttribute < ConcentrationMeasurement . MeasurementMedium , any > ; measurementUnit : FixedAttribute < ConcentrationMeasurement . MeasurementUnit , any > & { isConditional : true ; mandatoryIf : [ ] | [ { numericMeasurement : boolean ; } ] ; optional : true ; optionalIf : [ ] | ConditionalFeatureList < BitSchema > ; } ; minMeasuredValue : Attribute < null | number , any > & { isConditional : true ; mandatoryIf : [ ] | [ { numericMeasurement : boolean ; } ] ; optional : true ; optionalIf : [ ] | ConditionalFeatureList < BitSchema > ; } ; peakMeasuredValue : Attribute < null | number , any > & { isConditional : true ; mandatoryIf : [ ] | [ { peakMeasurement : boolean ; } ] ; optional : true ; optionalIf : [ ] | ConditionalFeatureList < BitSchema > ; } ; peakMeasuredValueWindow : Attribute < number , any > & { isConditional : true ; mandatoryIf : [ ] | [ { peakMeasurement : boolean ; } ] ; optional : true ; optionalIf : [ ] | ConditionalFeatureList < BitSchema > ; } ; uncertainty : OptionalAttribute < number , any > & { isConditional : true ; mandatoryIf : [ ] | ConditionalFeatureList < BitSchema > ; optional : true ; optionalIf : [ ] | [ { numericMeasurement : boolean ; } ] ; } ; } , GlobalAttributes < { averageMeasurement : BitFlag ; criticalLevel : BitFlag ; levelIndication : BitFlag ; mediumLevel : BitFlag ; numericMeasurement : BitFlag ; peakMeasurement : BitFlag ; } > >
An identity type.
You can't do:
But you can do:
Without this type you'd have to do:
We have to do this a lot because we generate complex objects with detailed type information. When exported, TS (as of 5.2) inlines the type of these objects in declarations which makes our declarations massive. To avoid this we create an interface from the type then cast to the interface for export.