Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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. }