import { worker } from 'monaco-editor'; /** * Change each callback of the type param to a promisified version. */ export declare type WorkerImplementation = { [K in keyof T]: T[K] extends (...args: infer A) => infer R ? (...args: A) => Awaited | PromiseLike> : never; }; /** * A function for initializing a web worker. */ export declare type WebWorkerInitializeFunction = (ctx: worker.IWorkerContext, createData: C) => WorkerImplementation; /** * Create a web worker proxy. * * @param fn - The function that creates the web worker. */ export declare function initialize(fn: WebWorkerInitializeFunction): void;