[bug] Updating from version 1.6.8 to 1.7.8 causes a type inference error from the useAppKit function
Link to minimal reproducible example
https://imgur.com/a/zPNd19I
Steps to Reproduce
I'm creating a custom hook using useAppKit() to destructure the open property and return it from my custom hook. After exporting the hook, it throws the following error:
The inferred type of 'useConnectButtonStore' cannot be named without a reference to '../../../node_modules/@reown/appkit/dist/types/src/client/appkit-base-client'. This is likely not portable. A type annotation is necessary.
Summary
I expected to be able to infer types as it worked in version 1.6.8, but with version 1.7.8, this is no longer possible without explicit type annotations.
List of related npm package versions
"dependencies": { "@Beraborrowofficial/sdk": "2.3.3", "@emotion/react": "11.13.3", "@emotion/styled": "11.13.0", "@mui/icons-material": "5.16.7", "@mui/material": "5.16.7", "@reown/appkit": "1.7.8", "@reown/appkit-adapter-wagmi": "1.7.8", "@sentry/react": "8.50.0", "@sentry/vite-plugin": "3.0.0", "@tanstack/query-core": "5.59.6", "@tanstack/react-query": "5.59.6", "@wagmi/core": "2.16.4", "axios": "1.8.1", "jotai": "2.10.1", "jotai-effect": "1.0.3", "jotai-scope": "0.6.0", "jotai-tanstack-query": "0.8.8", "posthog-js": "1.170.1", "react": "18.3.1", "react-dom": "18.3.1", "react-error-boundary": "4.1.1", "react-gtm-module": "2.0.11", "react-router-dom": "6.27.0", "react-swipeable": "^7.0.2", "viem": "2.23.3", "wagmi": "2.14.11" }, "devDependencies": { "@types/node": "22.7.6", "@types/react": "18.3.1", "@types/react-dom": "18.3.1", "@types/react-gtm-module": "2.0.3", "@typescript-eslint/eslint-plugin": "8.9.0", "@typescript-eslint/parser": "8.9.0", "@typescript-eslint/utils": "8.9.0", "@vitejs/plugin-react": "4.3.2", "@vitejs/plugin-react-swc": "3.7.1", "dotenv": "16.4.5", "eslint": "9.12.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-react-hooks": "5.0.0", "eslint-plugin-react-refresh": "0.4.12", "prettier": "3.3.3", "sass": " 1.80.1", "typescript": "5.6.3", "vite": "5.4.9", "vite-bundle-visualizer": "1.2.1", "vite-plugin-pwa": "0.20.5" },
Node.js Version
v22.16.0