CodinGame / monaco-vscode-api

VSCode public API plugged on the monaco editor
MIT License
226 stars 31 forks source link

How to add d.ts file #301

Closed aiselp closed 9 months ago

aiselp commented 9 months ago

The following method worked in previous versions, but it doesn't work now

monaco.languages.typescript.javascriptDefaults.addExtraLib()
CGNonofr commented 9 months ago

Are you using the Monaco contribution or the VSCode extension? That method only works with the first one

aiselp commented 9 months ago

I seem to be using the 2nd option,Is there any way to achieve the same effect?

CGNonofr commented 9 months ago

Then it works the same way as in VSCode, so put the file un the workspace and reference it from the tsconfig