Перейти к содержимому
Русский

defineOffloadTask

Это содержимое пока не доступно на вашем языке.

defineOffloadTask<TArgs, TResult>(module, exportName): OffloadTask<TArgs, TResult>

Defined in: src/worker/OffloadTask.ts:29

Name a task. Resolve the module against the caller, as in defineOffloadTask(new URL('./hash.js', import.meta.url), 'hashPassword'); a bundler that inlines modules is the one environment this does not survive, and the docs say so. The type parameters are what pool.run checks the arguments and the result against.

TArgs extends readonly unknown[]

TResult

string | URL

string

OffloadTask<TArgs, TResult>