JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.49k stars 4.12k forks source link

Allow type imports #5769

Closed xec closed 10 months ago

xec commented 10 months ago

I'm working on a typescript react component library that wraps and restyles react-select including types, and in an effort to make that work we currently have the following type import;

import type SelectClass from 'react-select/dist/declarations/src/Select'

exports field in package.json was introduced in https://github.com/JedWatson/react-select/pull/5559 which breaks this since nothing can be imported from react-select/dist/declarations/... any longer :/

Adding an export rule for declaration types in the package fixes this issue.

changeset-bot[bot] commented 10 months ago

🦋 Changeset detected

Latest commit: 6b5579148a1a65bc779b7f5809dd65cb5ba4e3a9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------ | ----- | | react-select | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

xec commented 10 months ago

duplicate of https://github.com/JedWatson/react-select/pull/5762