I am compiling multiple TypeScript files into a single JavaScript file. Say for example they are called:
A.ts // depends on C.ts
B.ts // depends on C.ts
C.ts
When I checked the JavaScript output, I found a problem: TypeScript's __extends function failed due to being passed an undefined value.
Compilation should have been in the following order:
C.ts // because A and B depend on this respectively.
A.ts
B.ts
but unfortunately they were compiled according to their names (alphabetically) rather than in dependency order.
- Can this be solved?
- Is the TypeScript team aware of this issue?
Note: This is a Visual Studio TypeScript compiler issue. Presumably using the command line compiler would fix this, but I would like to compile from Visual Studio.
--outis bad" from basarat.