MCPcopy Create free account
hub / github.com/arktypeio/arktype / updateWorker

Function updateWorker

ark/aot/unplugin.ts:234–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232 // size, where a browser loads the bundle and they'd outweigh arktype compiled
233 let chosen: PrecompileUnpluginOptions = {}
234 const updateWorker = () => {
235 // what's set, in the call or ark.json, isn't chosen over
236 const chose = { ...chosen, ...definedOf(set) }
237 const updated = environment ? withEnvironment(chose, environment) : chose
238 if (JSON.stringify(updated) === JSON.stringify(workerOptions)) return
239 workerOptions = updated
240 restart()
241 }
242 const setEnvironment = (bundlerEnvironment: Environment) => {
243 // compilers sharing the plugin, as Rsbuild's environments do, that
244 // build one for a browser and one for a server share its worker, so

Callers 3

scanChoosingFunction · 0.85
setEnvironmentFunction · 0.85
applySettingsFunction · 0.85

Calls 3

definedOfFunction · 0.90
withEnvironmentFunction · 0.90
restartFunction · 0.85

Tested by

no test coverage detected