refactor(web): mark Props of workflow/variable-inspect components as read-only (#25219) (#37230)

This commit is contained in:
Evan 2026-06-09 16:51:28 +08:00 committed by GitHub
parent c88a38b8b5
commit 34f3591d4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

View File

@ -18,7 +18,7 @@ import { VariableIconWithColor } from '@/app/components/workflow/nodes/_base/com
import { VarInInspectType } from '@/types/workflow'
import { useToolIcon } from '../hooks'
type Props = {
type Props = Readonly<{
nodeData?: NodeWithVar
currentVar?: currentVarType
varType: VarInInspectType
@ -26,7 +26,7 @@ type Props = {
handleSelect: (state: any) => void
handleView?: () => void
handleClear?: () => void
}
}>
const Group = ({
nodeData,

View File

@ -5,11 +5,11 @@ import { RiInformation2Fill } from '@remixicon/react'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
type Props = {
type Props = Readonly<{
textHasNoExport?: boolean
downloadUrl?: string
className?: string
}
}>
const LargeDataAlert: FC<Props> = ({
textHasNoExport,

View File

@ -11,10 +11,10 @@ import { useNodesInteractions } from '../hooks/use-nodes-interactions'
import { useStore } from '../store'
import Group from './group'
type Props = {
type Props = Readonly<{
currentNodeVar?: currentVarType
handleVarSelect: (state: any) => void
}
}>
const Left = ({
currentNodeVar,

View File

@ -36,12 +36,12 @@ import { BlockEnum } from '../types'
import Empty from './empty'
import ValueContent from './value-content'
type Props = {
type Props = Readonly<{
nodeId: string
currentNodeVar?: currentVarType
handleOpenMenu: () => void
isValueFetching?: boolean
}
}>
const Right = ({
nodeId,

View File

@ -20,11 +20,11 @@ import {
validateInspectJsonValue,
} from './value-content.helpers'
type Props = {
type Props = Readonly<{
currentVar: VarInInspect
handleValueChange: (varId: string, value: any) => void
isTruncated: boolean
}
}>
const ValueContent = ({
currentVar,