UNPKG

@sheetxl/scripting

Version:

Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild.

7 lines (6 loc) 860 B
"use strict";/** * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.6.6 * * (C) 2025-present SheetXL Inc. & Michael T. Ford * License: The license can be found at https://www.sheetxl.com/license. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.TypeScriptCompiler=class{constructor(r={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;const{createCompilerWorker:r}=await Promise.resolve().then(()=>require("./C_Iq5UdbouthFgF6.cjs"));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}};