lukasbach / monaco-editor-auto-typings

Automatically load declaration files while typing in monaco editor instances
https://lukasbach.github.io/monaco-editor-auto-typings/
MIT License
181 stars 39 forks source link

[FEEDBACK] Reload all packages after setVersions #21

Open seho-dev opened 2 years ago

seho-dev commented 2 years ago

I am writing a web ide, and I use this plugin for the first time. I want to reload all package versions after I setversions. For example, react has been loaded at this time. When setversions, there is no react dependency, so monaco needs to reload The import of react is marked in red

seho-dev commented 2 years ago
  public setVersions(versions: { [packageName: string]: string }) {
    this.versions = versions;
    this.options.onUpdateVersions?.(versions);
    // TODO reload packages whose version has changed
  }

Or can the respected author tell me the implementation idea of reload, I am willing to submit a pull request for the warehouse

seho-dev commented 2 years ago

@lukasbach