import { QueryTopic } from './query-topic-types' ; import { Topic , TopicKind , TopicType } from './topic-types' ; export const isSystemTopic = ( topic ) : boolean => topic . kind === TopicKind . SYSTEM ; export const isBusinessTopic = ( topic ) : boolean => topic . kind === TopicKind . BUSINESS ; export const isRawTopic = ( topic ) : boolean => topic . type === TopicType . RAW ; export const isNotRawTopic = ( topic ) : boolean => ! isRawTopic ( topic ) ; export const isMetaTopic = ( topic ) : boolean => topic . type === TopicType . META ; export const isDistinctTopic = ( topic ) : boolean => topic . type === TopicType . DISTINCT ; export const isNotDistinctTopic = ( topic ) : boolean => ! isDistinctTopic ( topic ) ; export const isAggregationTopic = ( topic ) : boolean => { return TopicType . AGGREGATE === topic . type || TopicType . TIME === topic . type || TopicType . RATIO === topic . type ; } ; export const isNotAggregationTopic = ( topic ) : boolean => ! isAggregationTopic ( topic ) ;