Skip to content

v6 does not allow for named imports with TypeScript Change #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ajcrites opened this issue May 24, 2021 · 1 comment · May be fixed by #292
Closed

v6 does not allow for named imports with TypeScript Change #291

ajcrites opened this issue May 24, 2021 · 1 comment · May be fixed by #292

Comments

@ajcrites
Copy link
Contributor

In v5, you could do things like import { getItem } from 'react-native-sensitive-info' which was doing module.exports.

The change to export default no longer allows you do this, and you have to import SInfo ....

This can be fixed by using export = instead of export default or otherwise changing everything over to named exports. For now, my preference would just be to use export =.

In case the maintainers don't want to make this change, the TypeScript declarations need to be updated to remove the exported functions which are no longer exported.

@stale
Copy link

stale bot commented Jun 23, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the 🚧 stale label Jun 23, 2021
@stale stale bot closed this as completed Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant