UNPKG

@digitalasset/daml-ledger

Version:
24 lines 799 B
"use strict"; // Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.forward = exports.forwardVoidResponse = exports.promisify = void 0; const util_1 = require("util"); function promisify(call) { return util_1.promisify(call); } exports.promisify = promisify; function forwardVoidResponse(callback, error) { forward(callback, error, undefined, () => { }); } exports.forwardVoidResponse = forwardVoidResponse; function forward(callback, error, response, process) { if (error) { callback(error); } else { callback(null, process(response)); } } exports.forward = forward; //# sourceMappingURL=Callback.js.map