You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

utils.ts 462B

1234567891011
  1. import { PipelineInputVarType } from '@/models/pipeline'
  2. import { VarType } from '@/app/components/workflow/types'
  3. export const inputVarTypeToVarType = (type: PipelineInputVarType): VarType => {
  4. return ({
  5. [PipelineInputVarType.number]: VarType.number,
  6. [PipelineInputVarType.singleFile]: VarType.file,
  7. [PipelineInputVarType.multiFiles]: VarType.arrayFile,
  8. [PipelineInputVarType.checkbox]: VarType.boolean,
  9. } as any)[type] || VarType.string
  10. }