dify/web/app/components/workflow/nodes/data-source/utils.ts
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

16 lines
504 B
TypeScript

import { VarType } from '@/app/components/workflow/types'
import { PipelineInputVarType } from '@/models/pipeline'
export const inputVarTypeToVarType = (type: PipelineInputVarType): VarType => {
return (
(
{
[PipelineInputVarType.number]: VarType.number,
[PipelineInputVarType.singleFile]: VarType.file,
[PipelineInputVarType.multiFiles]: VarType.arrayFile,
[PipelineInputVarType.checkbox]: VarType.boolean,
} as any
)[type] || VarType.string
)
}