mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-06-19 14:31:13 +00:00
TypeScript is better at inferring types when using simple functions and objects instead of classes. As a result many type annotations have now been removed without impacting type safety. Some other benefits are this can be minified better and private fields are now truly private variables.
7 lines
236 B
TypeScript
7 lines
236 B
TypeScript
import { initialize } from 'monaco-editor/esm/vs/editor/editor.worker';
|
|
|
|
import { createYAMLWorker } from './yamlWorker';
|
|
|
|
self.onmessage = () => {
|
|
initialize((ctx, createData) => Object.create(createYAMLWorker(ctx, createData)));
|
|
};
|