import { SingleMetricJobCreator } from './single_metric_job_creator' ; import { MultiMetricJobCreator } from './multi_metric_job_creator' ; import { PopulationJobCreator } from './population_job_creator' ; import { AdvancedJobCreator } from './advanced_job_creator' ; import { CategorizationJobCreator } from './categorization_job_creator' ; import { RareJobCreator } from './rare_job_creator' ; import { JOB_TYPE } from '../../../../../../common/constants/new_job' ; export type JobCreatorType = SingleMetricJobCreator | MultiMetricJobCreator | PopulationJobCreator | AdvancedJobCreator | CategorizationJobCreator | RareJobCreator ; export function isSingleMetricJobCreator ( jobCreator ) { return jobCreator . type === JOB_TYPE . SINGLE_METRIC ; } export function isMultiMetricJobCreator ( jobCreator ) { return jobCreator . type === JOB_TYPE . MULTI_METRIC ; } export function isPopulationJobCreator ( jobCreator ) { return jobCreator . type === JOB_TYPE . POPULATION ; } export function isAdvancedJobCreator ( jobCreator ) { return jobCreator . type === JOB_TYPE . ADVANCED ; } export function isCategorizationJobCreator ( jobCreator ) { return jobCreator . type === JOB_TYPE . CATEGORIZATION ; } export function isRareJobCreator ( jobCreator ) { return jobCreator . type === JOB_TYPE . RARE ; }