UNPKG

@simplito/privmx-webendpoint

Version:

PrivMX Web Endpoint library

30 lines (27 loc) 806 B
"use strict"; /*! PrivMX Web Endpoint. Copyright © 2024 Simplito sp. z o.o. This file is part of the PrivMX Platform (https://privmx.dev). This software is Licensed under the PrivMX Free License. See the License for the specific language governing permissions and limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseApi = void 0; class BaseApi { _servicePtr; constructor(ptr) { this._servicePtr = ptr; } get servicePtr() { if (this._servicePtr < 0) { throw new Error("This API instance is no longer valid because the connection associated with it has been closed."); } return this._servicePtr; } destroyRefs() { this._servicePtr = -1; } } exports.BaseApi = BaseApi;