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

Module "immutable-assign" has no default export. #10

Closed
husainshabbir opened this issue May 29, 2017 · 5 comments
Closed

Module "immutable-assign" has no default export. #10

husainshabbir opened this issue May 29, 2017 · 5 comments

Comments

@husainshabbir
Copy link

I am using ImmutableAssign along with TypeScript on a project and import it using this:

import iassign from "immutable-assign"

However, the above gives me this linting error: error TS1192: Module '"immutable-assign"' has no default export. Is this something that you can fix?

@martinbu
Copy link

I have the same problem within an Angular 4 Project using Angular Cli.

@engineforce
Copy link
Owner

Please try following:

import * as iassign from "immutable-assign"

@husainshabbir
Copy link
Author

husainshabbir commented May 30, 2017

It does not work unfortunately. This way of importing does not invoke the iassign function at all.

EDIT:

If I import the way you suggested, then I must use the iassign function like this:

iassign.default(state, (s) => { ... });

However, the default function does not exist on type IIassign, raising another error.

@engineforce
Copy link
Owner

Please try 1.0.34, which is the new release, and still use following:

import * as iassign from "immutable-assign"
iassign(state, (s) => { ... });

@martinbu
Copy link

martinbu commented Jun 1, 2017

This works for me, thank you for the fast patch.

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

No branches or pull requests

3 participants