How to use the monaco-editor-core/esm/vs/editor/editor.worker.initialize function in monaco-editor-core

To help you get started, we’ve selected a few monaco-editor-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / monaco-json / src / json.worker.ts View on Github external
self.onmessage = () => {
	// ignore the first message
	worker.initialize((ctx, createData) => {
		return new JSONWorker(ctx, createData)
	});
};
github microsoft / monaco-typescript / src / ts.worker.ts View on Github external
self.onmessage = () => {
	// ignore the first message
	worker.initialize((ctx: monaco.worker.IWorkerContext, createData: ICreateData) => {
		return new TypeScriptWorker(ctx, createData)
	});
};

monaco-editor-core

A browser based code editor

MIT
Latest version published 1 month ago

Package Health Score

93 / 100
Full package analysis