diff --git a/tslib.d.ts b/tslib.d.ts index f2c78e7..c4a0e11 100644 --- a/tslib.d.ts +++ b/tslib.d.ts @@ -28,4 +28,6 @@ export declare function __await(v: any): any; export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; export declare function __asyncDelegator(o: any): any; export declare function __asyncValues(o: any): any; -export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; \ No newline at end of file +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; diff --git a/tslib.es6.js b/tslib.es6.js index a86ce73..195600a 100644 --- a/tslib.es6.js +++ b/tslib.es6.js @@ -164,3 +164,15 @@ export function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} diff --git a/tslib.js b/tslib.js index e666988..f7ba570 100644 --- a/tslib.js +++ b/tslib.js @@ -30,6 +30,8 @@ var __asyncGenerator; var __asyncDelegator; var __asyncValues; var __makeTemplateObject; +var __importStar; +var __importDefault; (function (factory) { var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; if (typeof define === "function" && define.amd) { @@ -205,6 +207,18 @@ var __makeTemplateObject; return cooked; }; + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + exporter("__extends", __extends); exporter("__assign", __assign); exporter("__rest", __rest); @@ -222,4 +236,6 @@ var __makeTemplateObject; exporter("__asyncDelegator", __asyncDelegator); exporter("__asyncValues", __asyncValues); exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); });