11 lines
408 B
TypeScript
Raw Normal View History

2025-05-27 18:44:04 +08:00
import { PipelineInputVarType } from '@/models/pipeline'
import { VarType } from '@/app/components/workflow/types'
export const inputVarTypeToVarType = (type: PipelineInputVarType): VarType => {
return ({
[PipelineInputVarType.number]: VarType.number,
[PipelineInputVarType.singleFile]: VarType.file,
[PipelineInputVarType.multiFiles]: VarType.arrayFile,
} as any)[type] || VarType.string
}