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
Web worker support is on the roadmap (#1222). One consideration though is that instead of just including the worker lib for every transpiled TypeScript module, potentially leading to code that would cause runtime errors, we would only include the web worker lib when transpiling modules for a worker. It may not be suitable for an MVP, but in the longer term, it would provide a better experience.
Of course a counter argument is that there might be a desire to write isomorphic code that detects if it is running under a worker, which might raise errors if attempting to load in normal "userland".
The text was updated successfully, but these errors were encountered:
@craigfay The Deno compiler currently checks all TypeScript code against an internal type library that includes all the non-DOM ES library information from TypeSCript (esnext). If the runtime APIs differ between the main user program and the worker program, the compiler should be able to enforce the consumption of those APIs in code too.
Web worker support is on the roadmap (#1222). One consideration though is that instead of just including the worker lib for every transpiled TypeScript module, potentially leading to code that would cause runtime errors, we would only include the web worker lib when transpiling modules for a worker. It may not be suitable for an MVP, but in the longer term, it would provide a better experience.
Of course a counter argument is that there might be a desire to write isomorphic code that detects if it is running under a worker, which might raise errors if attempting to load in normal "userland".
The text was updated successfully, but these errors were encountered: