vercel / swr

React Hooks for Data Fetching
https://swr.vercel.app
MIT License
30.35k stars 1.21k forks source link

Add SWRInfiniteMutatorOptions type to export #2954

Closed ludwigbacklund closed 5 months ago

ludwigbacklund commented 5 months ago

When using "moduleResolution": "Bundler" in tsconfig.json for a TypeScript project, and implicitly referencing SWRInfiniteMutatorOptions you get this error:

Exported variable '<redacted>' has or is using name 'SWRInfiniteMutatorOptions' from external module "/path/node_modules/swr/dist/infinite/index" but cannot be named.ts(4023)

These errors can be resolved by explicitly exporting these implicitly references types from swr.

codesandbox-ci[bot] commented 5 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.