Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Allow creating new languages that use the Monaco typescript features #16

Closed
wants to merge 24 commits into from

Conversation

stefan-lacatus
Copy link
Contributor

This PR reduces a lot of the duplicate code and adds an API to allow the user to create new languages that use the typescript workers.
In our app, the user can write JavaScript and typescript that is executed either on the sever, on in the browser. Depending on this, different extraLibs are present to provide correct intellisense.
Using this PR, we can, our app create workers for the languages that are executed server side, and reuse the standard typescript and JavaScript for the browser executed code.

@microsoft microsoft deleted a comment from msftclas Sep 26, 2017
@microsoft microsoft deleted a comment from msftclas Sep 26, 2017
@oldrich-svec
Copy link

@stefan-lacatus It seems that this code stops the worker every time there is a change:

this._configChangeListener = this._defaults.onDidChange(function () {
  return _this._stopWorker();
});

Therefore, whenever I call addExtraLib, the _configChangeListener is fired and the worker is stopped.

If I call addExtraLib fifty times, the worker gets downloaded and loaded fifty times. Is that an expected behaviour?

@stefan-lacatus
Copy link
Contributor Author

@oldrich-svec: You are correct. See: microsoft/monaco-editor#1300
I've added a new PR that fixes this #30

@oldrich-svec
Copy link

Perfect, thanks a lot ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants