UNPKG

@stylable/core

Version:

CSS for Components

27 lines 815 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createDiagnosticReporter = exports.Diagnostics = void 0; class Diagnostics { constructor(reports = []) { this.reports = reports; } report(diagnostic, context) { const node = context.node; this.reports.push({ filePath: node.source?.input.from, ...diagnostic, ...context, }); } } exports.Diagnostics = Diagnostics; function createDiagnosticReporter(code, severity, message) { const func = (...args) => { return { code, severity, message: message(...args) }; }; func.code = code; func.severity = severity; return func; } exports.createDiagnosticReporter = createDiagnosticReporter; //# sourceMappingURL=diagnostics.js.map