Currently when implementing of class inheritance in the output JS-file automatically added the following code:
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
And calls of the following kind:
__extends(MyClass, _super);
In the presence of large amount of TS-files in the project, this leads to a significant increase size of concatenated file (especially when using AMD-modules).
It would be nice to add a new compiler option (it can be called externalExtendsFunction), which would be allow to specify the name of analog __extends function from external script. For example, if we set to the externalExtendsFunction option a value equal to util.extends, then the __extends function code will not be generated in the JS-file and its calls will be as follows:
util.extends(MyClass, _super);
Currently when implementing of class inheritance in the output JS-file automatically added the following code:
And calls of the following kind:
In the presence of large amount of TS-files in the project, this leads to a significant increase size of concatenated file (especially when using AMD-modules).
It would be nice to add a new compiler option (it can be called
externalExtendsFunction), which would be allow to specify the name of analog__extendsfunction from external script. For example, if we set to theexternalExtendsFunctionoption a value equal toutil.extends, then the__extendsfunction code will not be generated in the JS-file and its calls will be as follows: