chore: perfect type definition (#940)

This commit is contained in:
bowen 2023-08-22 10:58:06 +08:00 • committed by GitHub
commit 5e0540077a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 97 additions and 70 deletions

View file

@ -10,7 +10,7 @@ const PluginPage = () => {
const { t } = useTranslation()
const { data: plugins, mutate } = useSWR('/workspaces/current/tool-providers', fetchPluginProviders)
const Plugin_MAP: Record<string, any> = {
const Plugin_MAP: Record<string, (plugin: PluginProvider) => JSX.Element> = {
serpapi: (plugin: PluginProvider) => <SerpapiPlugin key='serpapi' plugin={plugin} onUpdate={() => mutate()} />,
}