UNPKG

2.6 kBJavaScriptView Raw
1/*! *****************************************************************************
2Copyright (c) Microsoft Corporation. All rights reserved.
3Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4this file except in compliance with the License. You may obtain a copy of the
5License at http://www.apache.org/licenses/LICENSE-2.0
6
7THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10MERCHANTABLITY OR NON-INFRINGEMENT.
11
12See the Apache Version 2.0 License for specific language governing permissions
13and limitations under the License.
14***************************************************************************** */
15/* global Reflect, Promise */
16export const __assign = Object.assign || function (t) {
17 for (var s, i = 1, n = arguments.length; i < n; i++) {
18 s = arguments[i];
19 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
20 }
21 return t;
22};
23
24export const __decorate = function (decorators, target, key, desc) {
25 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
26 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
27 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;
28 return c > 3 && r && Object.defineProperty(target, key, r), r;
29};
30
31export const __param = function (paramIndex, decorator) {
32 return function (target, key) { decorator(target, key, paramIndex); }
33};
34
35export const __metadata = function (metadataKey, metadataValue) {
36 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
37};
38
39export const __awaiter = function (thisArg, _arguments, P, generator) {
40 return new (P || (P = Promise))(function (resolve, reject) {
41 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42 function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } }
43 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
44 step((generator = generator.apply(thisArg, _arguments)).next());
45 });
46};
\No newline at end of file