"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NoUnresolved = void 0;
const inspection_js_1 = require("../model/inspection.js");
class NoUnresolved extends inspection_js_1.ActionInspection {
    *inspect(action) {
        if (action.type === 'unresolved') {
            yield {
                name: 'no-unresolved-action',
                level: inspection_js_1.InspectionLevel.Error,
                message: `Unresolved action: ${action.$originalSpec?.type}`,
            };
        }
        for (const pipe of action.descendentPipes()) {
            if (pipe.type === 'unresolved') {
                yield {
                    name: 'no-unresolved-pipe',
                    level: inspection_js_1.InspectionLevel.Error,
                    message: `Unresolved pipe: ${pipe.$originalSpec?.type}`,
                };
            }
        }
    }
}
exports.NoUnresolved = NoUnresolved;
//# sourceMappingURL=no-unresolved.js.map