tslib/tslib.js

85 строки
4.2 KiB
TypeScript
Исходник Обычный вид История

2015-05-14 22:10:16 +03:00
/*! *****************************************************************************
2016-05-18 23:25:21 +03:00
Copyright (c) Microsoft Corporation. All rights reserved.
2015-05-14 22:10:16 +03:00
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
2016-05-18 23:25:21 +03:00
License at http://www.apache.org/licenses/LICENSE-2.0
2015-05-14 22:10:16 +03:00
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
2016-05-18 23:25:21 +03:00
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
2015-05-14 22:10:16 +03:00
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global global, define, System, Reflect, Promise */
2016-05-18 23:25:21 +03:00
var __tslib;
(function (factory) {
__tslib = { };
if (typeof global === "object" && !global.__tslib) global.__tslib = __tslib;
if (typeof self === "object" && !self.__tslib) self.__tslib = __tslib;
2015-05-14 22:10:16 +03:00
if (typeof System === 'object' && typeof System.register === 'function') {
System.register("tslib", [], function (exporter) {
factory(createExporter(__tslib, exporter));
return { setters: [], execute: function() { } };
});
2015-05-14 22:10:16 +03:00
}
else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(createExporter(__tslib, createExporter(module.exports)));
2015-05-14 22:10:16 +03:00
}
else if (typeof define === 'function' && define.amd) {
define("tslib", ["exports"], function (exports) { factory(createExporter(__tslib, createExporter(exports))); });
2015-05-14 22:10:16 +03:00
}
else {
factory(createExporter(__tslib));
}
function createExporter(exports, previous) {
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
2015-05-14 22:10:16 +03:00
}
})
(function (exporter) {
2016-05-18 23:25:21 +03:00
var __extends = function (d, b) {
2015-05-14 22:10:16 +03:00
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
2015-06-16 23:24:57 +03:00
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2016-05-18 23:25:21 +03:00
};
var __assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
var __decorate = function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
2016-05-18 23:25:21 +03:00
};
2015-05-14 22:10:16 +03:00
2016-05-18 23:25:21 +03:00
var __param = function (paramIndex, decorator) {
2015-05-14 22:10:16 +03:00
return function (target, key) { decorator(target, key, paramIndex); }
2016-05-18 23:25:21 +03:00
};
var __metadata = function (metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
2016-05-18 23:25:21 +03:00
};
var __awaiter = function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments)).next());
2015-06-16 23:24:29 +03:00
});
2016-05-18 23:25:21 +03:00
};
2015-05-14 22:10:16 +03:00
exporter('__extends', __extends);
2016-05-18 23:25:21 +03:00
exporter('__assign', __assign);
2015-05-14 22:10:16 +03:00
exporter('__decorate', __decorate);
exporter('__param', __param);
exporter('__metadata', __metadata);
exporter('__awaiter', __awaiter);
2016-05-18 23:25:21 +03:00
});