json.worker.ts 617 B

1234567891011121314
  1. /*---------------------------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Licensed under the MIT License. See License.txt in the project root for license information.
  4. *--------------------------------------------------------------------------------------------*/
  5. import * as worker from 'monaco-editor-core/esm/vs/editor/editor.worker';
  6. import { JSONWorker } from './jsonWorker';
  7. self.onmessage = () => {
  8. // ignore the first message
  9. worker.initialize((ctx, createData) => {
  10. return new JSONWorker(ctx, createData);
  11. });
  12. };