suren-atoyan/monaco-react

[Bug] - Unable to refresh type definitions when using the same interface name

doregg opened this issue · 3 comments

Describe the bug
I cannot refresh my type definitions when using setExtraLibs / dispose on addExtraLibs - when using the same interface name and same file path.
My interface is dynamically loaded and can be refreshed because of user interaction. I can't refresh the type definition because of this bug.

To Reproduce

Steps to reproduce the behavior:

  1. Setup monaco editor with type definition, filePath: ts:filename/typings.d.ts
  2. Change type definition without changing the interface name with the same filePath ts:filename/typings.d.ts
  3. Get a type error (because interface is not getting refreshed)
    See code in the playground

Expected behavior
monaco playground - there it works

Desktop (please complete the following information):

  • OS: mac
  • Browser chrome
  • Version latest monaco version

I tried to reproduce it and I don't see any issue. Please check this codesandbox

@suren-atoyan thanks for trying to reproduce
My use case is much more complex than that (language javascript with a lot of typescript configurations). I tried to implement my use case in the code sandbox but I couldn't make it work like in my local. Let's close it for now and if I'll have more time to invest on it I'll re-open. Thanks

@suren-atoyan thanks for trying to reproduce My use case is much more complex than that (language javascript with a lot of typescript configurations). I tried to implement my use case in the code sandbox but I couldn't make it work like in my local. Let's close it for now and if I'll have more time to invest on it I'll re-open. Thanks

sounds good 🙌