-
Notifications
You must be signed in to change notification settings - Fork 147
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
[Question] Using a thread worker written in TypeScript #67
Comments
I'll be on the same page soon when I switch to TS. If you figure this out it'd be great if someone could add it to the readme :) |
Have you done it with Javascript with multiple files or only one file containing all the business logic? Are you using native modules?
This file is here: |
I'm using native modules and multiple JS files on iOS but I have not tried Android. The readme has instructions for setting up native modules with Android which requires an additional step. It sounds like you may need to do that. |
I've seen that and used it already. The problem is that DeviceInfo is a React Native module ! |
No idea then. I know there's a community version of DeviceInfo as it's one
of the modules they are working on breaking out from the core. Maybe you
need to include it anyways?
…On Wed, Mar 13, 2019 at 1:57 PM Olivier MATROT ***@***.***> wrote:
I've seen that and used it already. The problem is that DeviceInfo is a
React Native module !
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#67 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjh8sIt23fArOooO9kDLqFxlUucnXwTks5vWTwDgaJpZM4btmiy>
.
--
Chris Roth
cjroth.com <http://www.cjroth.com>
|
It is a packager problem, there is a request to the 'thread.js' file to bundle it. |
Oops I missed your last comment. Yeah, I just import everything at the top of my js thread file. Importing works just the same as it does in the main RN JS thread though. It's basically a parallel universe. Were you able to get TS working with the thread? I'm starting to look into moving over to it now. |
Did you guys find a way to solve this? |
is it possible to run a string encoded js bundle instead of a file name? that way one could transpile TS and generate a big chungus JS bundle to run in the worker |
I'm using Typescript and a worker thread using a lot of modules.
I guess I should take the release route even for development to produce a correct javascript file to be used by this library. Am I wrong?
The text was updated successfully, but these errors were encountered: