window.MonacoEnvironment isn’t defined in types.
See original GitHub issuemonaco-editor version: 0.26.1 Browser: N/A OS: N/A Playground code that reproduces the issue: N/A
The following TypeScript code:
window.MonacoEnvironment = {};
Yields:
Property 'MonacoEnvironment' does not exist on type 'Window & typeof globalThis'.
window.MonacoEnvironment
isn’t defined by the type definitions, only the global MonacoEnvironment
is.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How do you explicitly set a new property on `window` in ...
Create a file called global.d.ts , e.g., /src/@types/global.d.ts , and then define an interface like: interface Window { myLib: any }.
Read more >monaco-yaml - npm Package Health Analysis - Snyk
YAML language plugin for the Monaco Editor. It provides the following features when editing YAML files: Code completion, based on JSON schemas or...
Read more >May 2022 (version 1.68) - Visual Studio Code
Currently, Go to Definition jumps to the type definition file (the .d.ts file) that defines the types for the target function or symbol....
Read more >PowerFX Plugins: Part 1 - Monaco Editor for PowerF...
So, with that, let's jump into part 1: how to build our own simple, lightweight PFX editing window... Design. To meet my stated...
Read more >YAML plugin for the Monaco Editor
window.MonacoEnvironment = { getWorker(moduleId, label) { switch (label) { case ... Editor in your project, then configure monaco-yaml as described above.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The types that have been added in https://github.com/microsoft/vscode/pull/128949 are incorrect. Due to how the types are processed, the global
Window
interface isn’t augmented./cc @alexdima
Another approach I’d personally like even better, is to get rid of the global
MonacoEnvironment
altogether and configure this using a function.