import { typescriptWorkerFacet } from "./facet.js";
const typescriptLintSource = async (view) => {
  const { worker } = view.state.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;
  });
};
export {
  typescriptLintSource
};
//# sourceMappingURL=linter.js.map
