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

fix type definition #121

Merged
merged 2 commits into from
Oct 3, 2018
Merged

fix type definition #121

merged 2 commits into from
Oct 3, 2018

Conversation

nataly87s
Copy link
Contributor

fixes issue #120
remove default export

fixes issue TehShrike#120 
remove default export
TehShrike added a commit that referenced this pull request Oct 3, 2018
This actually executes the typescript test file to make sure that the function actually gets imported and can be evaluated by TypeScript without throwing an error.

Should be fixed by #121
@TehShrike TehShrike merged commit 28cf0a9 into TehShrike:master Oct 3, 2018
@msssk
Copy link
Contributor

msssk commented Oct 4, 2018

I don't see how this is a fix.

How is

import * as merge from 'deepmerge';

better than

import merge from 'deepmerge';

I get that there's room for personal taste (personally, I find import * as very distasteful), but are there objective downsides to import merge?

@TehShrike
Copy link
Owner

@msssk it is not a matter of taste, import * is semantically different from import identifier. The first imports everything that is exposed by the module, the second imports only the default export.

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Description

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