UNPKG

1.82 kBJavaScriptView Raw
1"use strict";
2/*
3 * Copyright The OpenTelemetry Authors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17var __spreadArray = (this && this.__spreadArray) || function (to, from) {
18 for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
19 to[j] = from[i];
20 return to;
21};
22Object.defineProperty(exports, "__esModule", { value: true });
23exports.NoopContextManager = void 0;
24var context_1 = require("./context");
25var NoopContextManager = /** @class */ (function () {
26 function NoopContextManager() {
27 }
28 NoopContextManager.prototype.active = function () {
29 return context_1.ROOT_CONTEXT;
30 };
31 NoopContextManager.prototype.with = function (_context, fn, thisArg) {
32 var args = [];
33 for (var _i = 3; _i < arguments.length; _i++) {
34 args[_i - 3] = arguments[_i];
35 }
36 return fn.call.apply(fn, __spreadArray([thisArg], args));
37 };
38 NoopContextManager.prototype.bind = function (_context, target) {
39 return target;
40 };
41 NoopContextManager.prototype.enable = function () {
42 return this;
43 };
44 NoopContextManager.prototype.disable = function () {
45 return this;
46 };
47 return NoopContextManager;
48}());
49exports.NoopContextManager = NoopContextManager;
50//# sourceMappingURL=NoopContextManager.js.map
\No newline at end of file