Closed
Description
As far as I know, polyfill functions are repeated in each file they are needed, resulting in lot of duplicate code.
I suggest to optionally emit them as a module, so that they appear once in a bundled project.
E.g. instead of:
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var myclass= (function (_super) {
__extends(myclass, _super);
// ...
emit this:
var __extends = require("typescript-polyfills").extends;
var myclass= (function (_super) {
__extends(myclass, _super);
// ...
Metadata
Metadata
Assignees
Labels
No labels