You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get typescript definitions working for external libraries, together with peek definition and what not.
So I was playing around with it in the monaco playground, but can't get it to work correctly.
So I pulled down query-string-params from unpkg and try to load them in into Monaco. First of all, when I press the 馃挕 or Cmd+., it shows the following import path.
Off course I want it to just be query-string-params and that it automatically picks up the typescript definitions in @types/query-string-params. But I can't get it to work. If I manually import from 'query-string-params, it does not complain, but it can't find the typescript definitions either. Do I have to manually add @types/query-string-params/index.d.tsasquery-string-params/index.d.ts` instead?
Also, do note the %40 in the path. That is because monaco.Uri.toString() encodes that. If I replace the import to use @, it does not work either.
So there are a couple of problems I'm experiencing in this demo
Path in node_modules is relative
@ is being replaced with %40, although, it shouldn't import from that location in the first place
Importing the actual library does not work
Thanks in advance 馃檹 !
monaco-editor version: 0.25.2 Browser: Chrome OS: macOS Playground code that reproduces the issue:
Hi 馃憢
I'm trying to get typescript definitions working for external libraries, together with peek definition and what not.
So I was playing around with it in the monaco playground, but can't get it to work correctly.
So I pulled down
query-string-params
from unpkg and try to load them in into Monaco. First of all, when I press the 馃挕 or Cmd+., it shows the following import path.Off course I want it to just be
query-string-params
and that it automatically picks up the typescript definitions in@types/query-string-params
. But I can't get it to work. If I manually import from 'query-string-params, it does not complain, but it can't find the typescript definitions either. Do I have to manually add
@types/query-string-params/index.d.tsas
query-string-params/index.d.ts` instead?Also, do note the
%40
in the path. That is becausemonaco.Uri.toString()
encodes that. If I replace the import to use@
, it does not work either.So there are a couple of problems I'm experiencing in this demo
node_modules
is relative%40
, although, it shouldn't import from that location in the first placeThanks in advance 馃檹 !
monaco-editor version: 0.25.2
Browser: Chrome
OS: macOS
Playground code that reproduces the issue:
The text was updated successfully, but these errors were encountered: