UNPKG

778 BJavaScriptView Raw
1Object.defineProperty(exports, "__esModule", { value: true });
2var hub_1 = require("@sentry/hub");
3var utils_1 = require("@sentry/utils");
4/**
5 * Internal function to create a new SDK client instance. The client is
6 * installed and then bound to the current scope.
7 *
8 * @param clientClass The client class to instantiate.
9 * @param options Options to pass to the client.
10 */
11function initAndBind(clientClass, options) {
12 var _a;
13 if (options.debug === true) {
14 utils_1.logger.enable();
15 }
16 var hub = hub_1.getCurrentHub();
17 (_a = hub.getScope()) === null || _a === void 0 ? void 0 : _a.update(options.initialScope);
18 var client = new clientClass(options);
19 hub.bindClient(client);
20}
21exports.initAndBind = initAndBind;
22//# sourceMappingURL=sdk.js.map
\No newline at end of file