/** * Converts a function into a WebWorker URL object that can be passed into * thread(). Note that `fn` has to be a single function with no external * references or bindings, so that it can be stringified using .toString(). */ export declare function functionToWorker(fn: () => unknown): string; /** * Creates a new web worker, posts it a serializable data object, and returns * when the worker responds (or after a fixed timeout). */ export declare function thread(url: string | URL, data: unknown, timeout?: number): Promise;