- data.function = data.function || WorkerFunctions.jsonIntegerSerialization
- executeWorkerFunction(data)
- debug === true && console.debug('This is the main thread ' + isMainThread)
- return { ok: 1 }
+ data.function = data.function || TaskFunctions.factorial
+ data.debug = data.debug || false
+ const res = executeTaskFunction(data)
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
+ data.debug === true &&
+ console.debug(`This is the main thread ${isMainThread}`)
+ return res