prettier-plugin-jsdoc
Version:
Prettier plugin for format comment blocks and convert to standard Match with Visual studio and other IDE which support jsdoc and comments as markdown.
19 lines (18 loc) • 622 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseJSAsync = void 0;
const worker_threads_1 = require("worker_threads");
function parseJSAsync(workerData) {
return new Promise((resolve, reject) => {
const worker = new worker_threads_1.Worker("./worker.js", {
workerData,
});
worker.on("message", resolve);
worker.on("error", reject);
worker.on("exit", (code) => {
if (code !== 0)
reject(new Error(`Worker stopped with exit code ${code}`));
});
});
}
exports.parseJSAsync = parseJSAsync;