What is the correct way of using Zone.js in Node #411
Description
I want to use Zone.js on the back-end to create something like ThreadLocal-storage similar to the traditional web-servers. The idea is to run the request handling in a new Zone. This will be part of a new back-end framework on which I recently started working.
At the moment I am using it like this, imported before everything else:
import 'zone.js';
import "zone.js/dist/long-stack-trace-zone.js";
So far it works fine but importing it like this fails the TypeScript compilation with the following error:
Error TS2656: Exported external package typings file '../node_modules/zone.js/dist/zone.js.d.ts' is not a module. Please contact the package author to update the package definition.
This was reported here but so far was not resolved even though the issue was closed.
For now I did a temporary workaround by replacing the default typings that come with the package with typings from DefinitelyTyped which btw are not complete. I did this with postinstall script in order to make it working.
I am using the latest release: v0.6.15