Title: Typescript worker import error "TsWorker is not a constructor" · Issue #52 · NativeScript/worker-loader · GitHub
Open Graph Title: Typescript worker import error "TsWorker is not a constructor" · Issue #52 · NativeScript/worker-loader
X Title: Typescript worker import error "TsWorker is not a constructor" · Issue #52 · NativeScript/worker-loader
Description: On I found that importing the typescript worker with import * as TsWorker from 'nativescript-worker-loader!./workers/bt'; as per the docs does not let the worker to be created and raises the error [TypeError: TsWorker is not a constructo...
Open Graph Description: On I found that importing the typescript worker with import * as TsWorker from 'nativescript-worker-loader!./workers/bt'; as per the docs does not let the worker to be created and raises the error ...
X Description: On I found that importing the typescript worker with import * as TsWorker from 'nativescript-worker-loader!./workers/bt'; as per the docs does not let the worker to be created and raises th...
Opengraph URL: https://github.com/NativeScript/worker-loader/issues/52
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Typescript worker import error \"TsWorker is not a constructor\"","articleBody":"On I found that importing the typescript worker with\r\n```js\r\nimport * as TsWorker from 'nativescript-worker-loader!./workers/bt';\r\n```\r\nas per the docs does not let the worker to be created and raises the error `[TypeError: TsWorker is not a constructor]`.\r\n\r\nThe solution is simply to import it using\r\n```js\r\nimport TsWorker from 'nativescript-worker-loader!./workers/bt';\r\n```\r\n\r\nI tried both version `0.9.0` and `0.10.0` of this package, and the error is still there when importing with the first method, so I believe the documentation needs to be updated.","author":{"url":"https://github.com/belvederef","@type":"Person","name":"belvederef"},"datePublished":"2019-12-08T08:54:57Z","url":"https://github.com/NativeScript/worker-loader/issues/52"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9c4446d7-c07b-85ca-8746-5a87388a90af |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C09E:EDA7A:1A0F2B5:21165F3:6B014A4D |
| html-safe-nonce | 55c1b867d10f423d7a0fd5499fc23de8bd91f4ce9a3e59ce3da9cecde2276913 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDlFOkVEQTdBOjFBMEYyQjU6MjExNjVGMzo2QjAxNEE0RCIsInZpc2l0b3JfaWQiOiIxNjIxNzA3NjM0NzUzMjI3MzQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b7f9cc9d9a87725f030459c287820a97ca9825daa56c6f57850ab8219eaa9292 |
| hovercard-subject-tag | issue:534511506 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/worker-loader/52/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a63f3a0319bf600268260ff22609d8cbf3a7ec854c24473d1bdd52a7c54649ef/NativeScript/worker-loader/issues/52 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a63f3a0319bf600268260ff22609d8cbf3a7ec854c24473d1bdd52a7c54649ef/NativeScript/worker-loader/issues/52 |
| og:image:alt | On I found that importing the typescript worker with import * as TsWorker from 'nativescript-worker-loader!./workers/bt'; as per the docs does not let the worker to be created and raises the error ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | belvederef |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/worker-loader git https://github.com/NativeScript/worker-loader.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 99676258 |
| octolytics-dimension-repository_nwo | NativeScript/worker-loader |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 99676258 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/worker-loader |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width