-
Notifications
You must be signed in to change notification settings - Fork 47
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
ReferenceError: immutable_1 is not defined when using 'immutable' library #62
Comments
Hmm, it seems to happen whenever I do anything inside the job (like create a new instance):
This gives: Error: ConfigValidation_manager_1 is not defined |
Looking at the .js file that TypeScript generates, I see the following:
So it looks like the 'import' commands I have in my file won't work as they are not in the same scope as the worker...and my worker calls dozens of functions which also use various libraries, so they would all have similar issues. |
I moved all of the processing code to another file, with a couple exports: File: My.worker.ts
Then in Main.ts:
But this creates the error: "Cannot find module 'My.worker'". Does anyone have an example using TypeScript and calling a function in another file? I tried prefixing with __dirName, but that just added '.' to the name. |
Hi,
This library looks really cool. Unfortunately I hit a snag when I try to use 'immutable'. For example:
In the above example, it fails immediately with "immutable_1 is not defined". Is this a known limitation due to the way Immutable was written (using factories)?
Thanks!
The text was updated successfully, but these errors were encountered: