mirror of
https://github.com/langgenius/dify.git
synced 2026-01-06 06:26:00 +00:00
refactor: improve TypeScript types for NodeCardProps and debug configuration context (#27001)
This commit is contained in:
@@ -23,8 +23,10 @@ import {
|
||||
} from '../node-handle'
|
||||
import ErrorHandleOnNode from '../error-handle-on-node'
|
||||
|
||||
type NodeChildElement = ReactElement<Partial<NodeProps>>
|
||||
|
||||
type NodeCardProps = NodeProps & {
|
||||
children?: ReactElement
|
||||
children?: NodeChildElement
|
||||
}
|
||||
|
||||
const BaseCard = ({
|
||||
|
||||
@@ -242,7 +242,7 @@ const DebugConfigurationContext = createContext<IDebugConfiguration>({
|
||||
},
|
||||
datasetConfigsRef: {
|
||||
current: null,
|
||||
},
|
||||
} as unknown as RefObject<DatasetConfigs>,
|
||||
setDatasetConfigs: noop,
|
||||
hasSetContextVar: false,
|
||||
isShowVisionConfig: false,
|
||||
|
||||
@@ -324,7 +324,7 @@ const baseFetch = base
|
||||
|
||||
type UploadOptions = {
|
||||
xhr: XMLHttpRequest
|
||||
method: string
|
||||
method?: string
|
||||
url?: string
|
||||
headers?: Record<string, string>
|
||||
data: FormData
|
||||
|
||||
Reference in New Issue
Block a user