-
Notifications
You must be signed in to change notification settings - Fork 344
Conversation
Because zen observable uses the `export = Observable`, it should be imported using the form `import Observable = require('zen-observable');`. See https://www.typescriptlang.org/docs/handbook/modules.html under the heading "export = and import = require()": "When exporting a module using export =, TypeScript-specific import module = require("module") must be used to import the module."
See also #558 |
See also #248 |
See also #380 as a possible alternative fix. |
See also #515 |
See also #511 |
I'm not sure if it is appropriate to comment here, but I have a suspicion that this fix could solve an error that has haunted me for the last three days:
Really hope this PR can be merged. Edit: actually this was a result of conflicting type imports. But I am glad that the pr has been resolved at least |
It seems like recent changes to master have probably made this PR obsolete. |
Same issue as @THoisington , still present in 1.2.2 EDIT: |
@nicky-lenaers You should probably comment on one of the related issues. This PR would have to be redone since the code it was based on has changed in a significant way. |
@nicky-lenaers There is also a PR in zen-observable. For me it was specifically @types/node adding readonly and @types/zen-observable was missing it. Seems like things can really get messy with @types! |
Because zen observable uses the
export = Observable
, it should be imported using the formimport Observable = require('zen-observable');
.See https://www.typescriptlang.org/docs/handbook/modules.html under the heading "export = and import = require()":
This error occurs if your tsconfig has
Setting that option to false prevents the error.