Skip to content
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

make Draggable explicit default export #254

Closed

Conversation

HBehrens
Copy link

When I was trying to use this package with my TypeScript setup I ran into the issue that

import Draggable from 'react-draggable';

resulted in Draggable === undefined as TypeScript expects default exports to be assigned as module.exports.default = .... While I could probably change typings/index.d.ts to match the actual behavior import * as Draggable from 'react-draggable' I understand that the import statement above is the desired behavior.

This PR changes index.js to meet TS' expectation but doesn't remove the current module.exports = ... to avoid breaking compatibility.

I am not sure how exactly I could provide a unit-test for this. Any help appreciated.

@r0stig
Copy link

r0stig commented Jun 16, 2017

Just commenting to show my interest in this PR getting merged.

@HBehrens
Copy link
Author

Just commenting to show my interest in this PR getting merged.

How can I help with it?

@STRML
Copy link
Collaborator

STRML commented Aug 21, 2017

Fixed in afd7721

@STRML STRML closed this Aug 21, 2017
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.

3 participants