Add support for file include. #6616
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Duplicate
An existing issue was already created
Suggestion
An idea for TypeScript
It seems that one of the likeable features of TypeScript, compared to Babel lets say, is that it emits readable code.
Consider the following code:
X.ts:
Y.ts:
This emits:
There's a lot of code redundancy, which can really clutter the emitted output for projects that rely heavily on namespaces.
Wouldn't it be nice if we could just do something like this:
The include statement simply places the included file into the script during pre-compilation.
My guess is that this is already partly implemented with
/// reference
, only that///reference
doesn't seem to work unless it's either the first line, or one succeeding another/// reference
.The text was updated successfully, but these errors were encountered: