@sheetxl/studio-vanilla
Version:
SheetXL Studio - Vanilla entry point for integrating SheetXL UI.
30 lines (29 loc) • 860 B
JavaScript
/**
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.4
*
* (C) 2025-present SheetXL Inc. & Michael T. Ford
* License: The license can be found at https://www.sheetxl.com/license.
*/
class o {
constructor(r = {}) {
this.workerWrapper = null;
}
async getWorkerWrapper() {
if (this.workerWrapper) return this.workerWrapper;
const { createCompilerWorker: r } = await import("./DJU28FT-fFQgl9TT.js");
return this.workerWrapper = await r(), this.workerWrapper;
}
async compileModule(r) {
try {
return (await this.getWorkerWrapper()).execute(r);
} catch (e) {
throw console.error("Failed to compile using worker:", e), e;
}
}
terminate() {
this.workerWrapper?.terminate(), this.workerWrapper = null;
}
}
export {
o as TypeScriptCompiler
};