mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-23 00:22:56 +01:00
7 lines
243 B
TypeScript
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));
|
|
};
|
|
}
|