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
I'm not sure if this should work or not? I have a circular dependency between two modules which doesn't appear to be working. This code is written in TypeScript, and I'm using CommonJS as the output format (I can post the produced JS too, if needed):
The result is an error within the TypeScript-injected __extends function in mod-a.ts where it attempts to set the prototype of the class to that of the base constructor. It's because the base constructor is undefined.
Honestly not sure if this is a problem in TypeScript, in SystemJS, or if it's simply because I'm using the CommonJS output format, and only the register output can handle circular references?
The text was updated successfully, but these errors were encountered:
Circular dependencies work with the es6 and the register format. CommonJS doesn't support them. Support also cannot be added because of the way CommonJS works.
I'm not sure if this should work or not? I have a circular dependency between two modules which doesn't appear to be working. This code is written in TypeScript, and I'm using CommonJS as the output format (I can post the produced JS too, if needed):
mod-a.ts:
mod-b.ts:
index.ts
The result is an error within the TypeScript-injected __extends function in mod-a.ts where it attempts to set the prototype of the class to that of the base constructor. It's because the base constructor is undefined.
Honestly not sure if this is a problem in TypeScript, in SystemJS, or if it's simply because I'm using the CommonJS output format, and only the register output can handle circular references?
The text was updated successfully, but these errors were encountered: