I'm using Monaco for JavaScript object literal creation, where I need just the basic type completion, plus a custom one (using monaco.languages.registerCompletionItemProvider('javascript', ...)).
When I use the recommended solution in How to remove autocompletions for Monaco Editor using Javascript? :
monaco.languages.typescript.javascriptDefaults.setCompilerOptions(
{ noLib: true, allowNonTsExtensions: false}
)
...the result is much better:
... but now the developer console shows a continuous flow of uncaught errors when I interact with the Monaco Editor:
tsMode.js:8
Uncaught (in promise) Error: Could not find source file: 'inmemory://model/2'.
at ln (tsWorker.js:250)
at Object.sn [as getSyntacticDiagnostics] (tsWorker.js:250)
at pm.getSyntacticDiagnostics (tsWorker.js:35306)
at w.fmr (workerMain.js:17)
at s._handleMessage (workerMain.js:13)
at Object.handleMessage (workerMain.js:13)
at m._handleRequestMessage (workerMain.js:13)
at m._handleMessage (workerMain.js:13)
at m.handleMessage (workerMain.js:13)
at s.onmessage (workerMain.js:13)
How do I get rid of these errors?