export function firstNotNullishOf(array, selector) {
    for (const current of array) {
        const selected = selector(current);
        if (selected !== null && selected !== undefined) {
            return selected;
        }
    }
    return undefined;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlyc3Rfbm90X251bGxpc2hfb2YuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmaXJzdF9ub3RfbnVsbGlzaF9vZi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QkEsTUFBTSxVQUFVLGlCQUFpQixDQUMvQixLQUFtQixFQUNuQixRQUEyQztJQUUzQyxLQUFLLE1BQU0sT0FBTyxJQUFJLEtBQUssRUFBRTtRQUMzQixNQUFNLFFBQVEsR0FBRyxRQUFRLENBQUMsT0FBTyxDQUFDLENBQUM7UUFFbkMsSUFBSSxRQUFRLEtBQUssSUFBSSxJQUFJLFFBQVEsS0FBSyxTQUFTLEVBQUU7WUFDL0MsT0FBTyxRQUEwQixDQUFDO1NBQ25DO0tBQ0Y7SUFFRCxPQUFPLFNBQVMsQ0FBQztBQUNuQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IDIwMTgtMjAyMSB0aGUgRGVubyBhdXRob3JzLiBBbGwgcmlnaHRzIHJlc2VydmVkLiBNSVQgbGljZW5zZS5cbi8vIFRoaXMgbW9kdWxlIGlzIGJyb3dzZXIgY29tcGF0aWJsZS5cblxuLyoqXG4gKiBBcHBsaWVzIHRoZSBnaXZlbiBzZWxlY3RvciB0byBlbGVtZW50cyBpbiB0aGUgZ2l2ZW4gYXJyYXkgdW50aWwgYSB2YWx1ZSBpcyBwcm9kdWNlZCB0aGF0IGlzIG5laXRoZXIgYG51bGxgIG5vciBgdW5kZWZpbmVkYCBhbmQgcmV0dXJucyB0aGF0IHZhbHVlXG4gKiBSZXR1cm5zIGB1bmRlZmluZWRgIGlmIG5vIHN1Y2ggdmFsdWUgaXMgcHJvZHVjZWRcbiAqXG4gK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