"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const EnsureError_1 = require("./EnsureError");
/**
 * Similar to asset but throws on runtime if `condition` isn't met.
 * Possibility to add a `message` and some `data` to trace.
 * @throws {EnsureError}
 */
exports.ensure = (condition, message, data) => {
    if (condition !== true) {
        throw new EnsureError_1.EnsureError(message, data);
    }
};
