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