"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findInPrototypeChain = findInPrototypeChain;
const getBaseType_1 = require("./getBaseType");
function findInPrototypeChain(type, reader) {
    for (let currentType = type; currentType !== undefined; currentType = (0, getBaseType_1.getBaseType)(currentType)) {
        const value = reader(currentType);
        if (value !== undefined) {
            return value;
        }
    }
    return undefined;
}
//# sourceMappingURL=findInPrototypeChain.js.map