"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const facet = require("./facet.cjs");
const typescriptLintSource = async (view) => {
  const { worker } = view.state.facet(facet.typescriptWorkerFacet);
  const docLength = view.state.doc.length;
  const diagnostics = await worker.getDiagnostics();
  return diagnostics.filter((diag) => {
    return diag.from <= docLength && diag.to <= docLength && diag.from >= 0;
  });
};
exports.typescriptLintSource = typescriptLintSource;
//# sourceMappingURL=linter.cjs.map
