"use strict";
Array.prototype.findSafe = function (predicate) {
    const val = this.find(predicate);
    if (val === undefined) {
        throw new Error(`Cannot find element with predicate: ${predicate}`);
    }
    return val;
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmluZC1zYWZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vdGVzdGluZy9zcmMvdXRpbC9maW5kLXNhZmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUlBLEtBQUssQ0FBQyxTQUFTLENBQUMsUUFBUSxHQUFHLFVBQ3pCLFNBQTZEO0lBRTdELE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUM7SUFDakMsSUFBSSxHQUFHLEtBQUssU0FBUyxFQUFFO1FBQ3JCLE1BQU0sSUFBSSxLQUFLLENBQUMsdUNBQXVDLFNBQVMsRUFBRSxDQUFDLENBQUM7S0FDckU7SUFDRCxPQUFPLEdBQUcsQ0FBQztBQUNiLENBQUMsQ0FBQyJ9