var i = Object.defineProperty;
var r = (o, t) => i(o, "name", { value: t, configurable: !0 });
import { deserializeCompletions as p } from "./deserializeCompletions.js";
import { tsFacetWorker as n } from "../facet/tsFacetWorker.js";
function m(o = {}) {
  return async (t) => {
    const e = t.state.facet(n);
    return e?.worker ? p(await e.worker.getAutocompletion({
      path: e.path,
      // Reduce this object so that it's serializable.
      context: {
        pos: t.pos,
        explicit: t.explicit
      }
    }), o) : null;
  };
}
r(m, "tsAutocompleteWorker");
export {
  m as tsAutocompleteWorker
};
