refactor: improve TypeScript types for NodeCardProps and debug configuration context (#27001)

This commit is contained in:
GuanMu 2025-10-16 22:16:01 +08:00 committed by GitHub
parent 24612adf2c
commit 650e38e17f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -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 = ({

View File

@ -242,7 +242,7 @@ const DebugConfigurationContext = createContext<IDebugConfiguration>({
},
datasetConfigsRef: {
current: null,
},
} as unknown as RefObject<DatasetConfigs>,
setDatasetConfigs: noop,
hasSetContextVar: false,
isShowVisionConfig: false,

View File

@ -324,7 +324,7 @@ const baseFetch = base
type UploadOptions = {
xhr: XMLHttpRequest
method: string
method?: string
url?: string
headers?: Record<string, string>
data: FormData