monaco-editor/src/common/initialize.ts
Henning Dieterichs c38e22c86b esm progress
2025-08-15 19:19:12 +02:00

7 lines
243 B
TypeScript

import * as worker from 'monaco-editor-core/esm/vs/editor/editor.worker.start';
export function initialize(callback: (ctx: any, createData: any) => any): void {
self.onmessage = (m) => {
worker.start((ctx) => callback(ctx, m.data));
};
}