You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should just // @ts-ignore that line. That symbol is only defined within workers so if you're using it to check if you're in a worker you'll have to bypass type-checking.
@F3n67u FYI there's already an open PR to add worker_threads that is feature-complete: denoland/std#1151 but we still haven't landed it due to type checking issues. I suggest not to duplicate the work and maybe instead try to figure out the type checking problems in aforementioned PR?
@F3n67u FYI there's already an open PR to add worker_threads that is feature-complete: denoland/deno_std#1151 but we still haven't landed it due to type checking issues. I suggest not to duplicate the work and maybe instead try to figure out the type checking problems in aforementioned PR?
@bartlomieju ok, thanks for your information. I will set isMainThread as true when it's used in the node test now. It's ok when the node test is not related to worker.
I tried implement
worker_threads.isMainThread
viaDedicatedWorkerGlobalScope
, but deno complain cannot find nameDedicatedWorkerGlobalScope
;The text was updated successfully, but these errors were encountered: