sheetxl
Version:
SheetXL - Command line tool
30 lines (29 loc) • 815 B
JavaScript
/**
* @license sheetxl - SheetXL - Command line tool - v0.6.0
*
* (C) 2025-present SheetXL Inc. & Michael T. Ford
* License: The license can be found at https://www.sheetxl.com/license.
*/
class r {
constructor(r2 = {}) {
this.workerWrapper = null;
}
async getWorkerWrapper() {
if (this.workerWrapper) return this.workerWrapper;
const { createCompilerWorker: r2 } = await import("./Ca46GgF-vFFOts5D.js");
return this.workerWrapper = await r2(), this.workerWrapper;
}
async compileModule(r2) {
try {
return (await this.getWorkerWrapper()).execute(r2);
} catch (r3) {
throw console.error("Failed to compile using worker:", r3), r3;
}
}
terminate() {
this.workerWrapper?.terminate(), this.workerWrapper = null;
}
}
export {
r as TypeScriptCompiler
};