You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@tanstack/react-form: declare @types/react as an optional peer dependency #2472
@tanstack/react-form ships type declarations that import from react but doesn't declare @types/react.
With an install layout where packages live outside the project, such as pnpm's global virtual store (virtualStoreType: global), TypeScript resolves react from the package's real path. The react peer is linked next to the package, @types/react is not, so TypeScript picks the untyped react/index.js and every React type in these declarations silently becomes any.
Consumers see it as errors in their own code, for example TS7006: Parameter 'x' implicitly has an 'any' type on callback parameters, or component props that lose children and className. Under pnpm's default layout it only works through pnpm's hidden hoisting fallback (node_modules/.pnpm/node_modules).
Optional, so JavaScript consumers are unaffected. The range can mirror the existing react peer range. react-router, @tanstack/react-query and recharts (recharts#7710) do the same.
Activity