Skip to content

Commit

Permalink
Merge pull request #43 from Microsoft/import-helpers
Browse files Browse the repository at this point in the history
Add import helpers
  • Loading branch information
weswigham authored Jan 18, 2018
2 parents b1ed5e1 + c1cd8e1 commit c380b8d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tslib.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
export declare function __importStar<T>(mod: T): T;
export declare function __importDefault<T>(mod: T): T | { default: T };
12 changes: 12 additions & 0 deletions tslib.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
16 changes: 16 additions & 0 deletions tslib.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand All @@ -222,4 +236,6 @@ var __makeTemplateObject;
exporter("__asyncDelegator", __asyncDelegator);
exporter("__asyncValues", __asyncValues);
exporter("__makeTemplateObject", __makeTemplateObject);
exporter("__importStar", __importStar);
exporter("__importDefault", __importDefault);
});

0 comments on commit c380b8d

Please sign in to comment.