refactor: type improvements that doesn't modify functionality (#17970)

This commit is contained in:
yusheng chen 2025-04-14 16:06:10 +08:00 committed by GitHub
commit 4c99e9dc73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 69 additions and 63 deletions

View file

@ -67,7 +67,7 @@ const CardWrapper = ({
{
isShowInstallFromMarketplace && (
<InstallFromMarketplace
manifest={plugin as any}
manifest={plugin}
uniqueIdentifier={plugin.latest_package_identifier}
onClose={hideInstallFromMarketplace}
onSuccess={hideInstallFromMarketplace}

View file

@ -108,7 +108,7 @@ const EndpointCard = ({
Toast.notify({ type: 'error', message: t('common.actionMsg.modifiedUnsuccessfully') })
},
})
const handleUpdate = (state: any) => updateEndpoint({
const handleUpdate = (state: Record<string, any>) => updateEndpoint({
endpointID,
state,
})

View file

@ -55,7 +55,7 @@ const EndpointList = ({ detail }: Props) => {
},
})
const handleCreate = (state: any) => createEndpoint({
const handleCreate = (state: Record<string, any>) => createEndpoint({
pluginUniqueID,
state,
})

View file

@ -245,7 +245,7 @@ const ReasoningConfigForm: React.FC<Props> = ({
popupClassName='!w-[387px]'
isAdvancedMode
isInWorkflow
value={varInput as any}
value={varInput}
setModel={handleModelChange(variable)}
scope={scope}
/>

View file

@ -83,7 +83,7 @@ const ProviderCard: FC<Props> = ({
{
isShowInstallFromMarketplace && (
<InstallFromMarketplace
manifest={payload as any}
manifest={payload}
uniqueIdentifier={payload.latest_package_identifier}
onClose={hideInstallFromMarketplace}
onSuccess={() => hideInstallFromMarketplace()}