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
It appears that the order in which the output is emitted into a single file is determined by the references. In general, if a file references another, the other file is emitted first.
As a matter of preference, I want to have every file which requires the symbols of another file to reference that other file. In other words I want (at least) that if the services is run on any of my files individually, there would be no missing symbols.
Unfortunately this breaks on the simplest case of having a class which makes references its subclasses when these are in different files. I need the parent class to be emitted first, and the subclasses need to follow, but since the parent class file references the subclasses, they get emitted first and we get the error __.prototype = b.prototype; b is undefined (in __extends() of course).
A correct emit order ought to be determined by use of symbols at the module and class-static level. But the compile time cost of scanning for symbols and determining their source locations may be prohibitive.
Or there could be an extension to /// <reference ...> to indicate either that the referenced file is needed at load-time and/or not. (In the case of the "I need this loaded first" annotation, we could detect cycles and flag errors).
The text was updated successfully, but these errors were encountered:
It appears that the order in which the output is emitted into a single file is determined by the references. In general, if a file references another, the other file is emitted first.
As a matter of preference, I want to have every file which requires the symbols of another file to reference that other file. In other words I want (at least) that if the services is run on any of my files individually, there would be no missing symbols.
Unfortunately this breaks on the simplest case of having a class which makes references its subclasses when these are in different files. I need the parent class to be emitted first, and the subclasses need to follow, but since the parent class file references the subclasses, they get emitted first and we get the error
__.prototype = b.prototype;
b is undefined (in__extends()
of course).A correct emit order ought to be determined by use of symbols at the module and class-static level. But the compile time cost of scanning for symbols and determining their source locations may be prohibitive.
Or there could be an extension to /// <reference ...> to indicate either that the referenced file is needed at load-time and/or not. (In the case of the "I need this loaded first" annotation, we could detect cycles and flag errors).
The text was updated successfully, but these errors were encountered: