Skip to content

Fix strict pnpm type resolution for @headlessui/react#3869

Open
raashish1601 wants to merge 1 commit intotailwindlabs:mainfrom
raashish1601:contributor-08/headlessui-3865
Open

Fix strict pnpm type resolution for @headlessui/react#3869
raashish1601 wants to merge 1 commit intotailwindlabs:mainfrom
raashish1601:contributor-08/headlessui-3865

Conversation

@raashish1601
Copy link
Copy Markdown

Summary

  • add optional @types/react and @types/react-dom peers for @headlessui/react so strict pnpm installs know about the React type packages the declarations rely on
  • keep useFloatingReference() typed against @floating-ui/react's public ReferenceType export instead of leaking @floating-ui/react-dom into the published declarations

Testing

px prettier --write packages/@headlessui-react/package.json packages/@headlessui-react/src/internal/floating.tsx`n-
px tsc --emitDeclarationOnly --outDir dist (in packages/@headlessui-react)

  • corepack pnpm exec tsc --noEmit in a strict-pnpm repro after installing the packed local tarball

Closes #3865

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 28, 2026

@raashish1601 is attempting to deploy a commit to the Tailwind Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@headlessui/react fails with pnpm strict mode — missing peerDependency on @types/react

1 participant