mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
12 lines
361 B
TypeScript
12 lines
361 B
TypeScript
import * as monaco from 'monaco-editor-core/esm/vs/editor/editor.api';
|
|
|
|
export function getGlobalMonaco(): any {
|
|
return monaco;
|
|
}
|
|
|
|
// TODO@hediet get rid of the monaco global
|
|
|
|
const monacoEnvironment: monaco.Environment | undefined = (globalThis as any).MonacoEnvironment;
|
|
if (monacoEnvironment?.globalAPI) {
|
|
(globalThis as any).monaco = getGlobalMonaco();
|
|
}
|