Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating new TypeScript versions into the Monaco editor #177

Closed
Zlatkovsky opened this issue Sep 8, 2016 · 4 comments
Closed

Integrating new TypeScript versions into the Monaco editor #177

Zlatkovsky opened this issue Sep 8, 2016 · 4 comments
Assignees

Comments

@Zlatkovsky
Copy link
Member

Per TypeScript team's microsoft/TypeScript#1664,

Async function support for target ES3/ES5 is now available in typescript@2.1.0-dev.20160907 and later.

Is there a set of instructions for how to integrate a new version of TypeScript (which, in this case, supports the long-awaited Async/Await) into Monaco?

@alexdima
Copy link
Member

TS/JS support comes in from https://github.com/Microsoft/monaco-typescript

I am unsure what our timeline is on adopting TS 2.0 in monaco-typescript, @jrieken can answer that.

You could do it today by forking that project and updating the package.json and you can run gulp import-typescript to fetch the latest versions from the node module and "massage" the scripts such that they are AMD ready. You can then see if there are any compilation errors (breaking changes) and try to adopt them. I think @jrieken would be happy if it would culminate with a PR :).

@Zlatkovsky
Copy link
Member Author

An update with my findings:

It turns out that just purely for getting syntax highlighting and syntax-recognition of the async and await keywords, I actually didn't need to do anything I merely included my TypeScript compiler reference (which I already needed anyway), and everything "just worked".

<script src="//unpkg.com/typescript@2.1.0-dev.20160908/lib/typescript.js"></script>
<script src="vs/loader.js"></script>

I did not try any scenario beyond that (I'm already doing compiling via my own call to tsc, outside of Monaco), and nothing jumped out as obviously broken when I did this.

@jrieken jrieken added question and removed question labels Sep 12, 2016
@jrieken
Copy link
Member

jrieken commented Sep 12, 2016

Once TypeScript 2.0 shipped we can think about a timeline for adopting it. Currently no plans for that

@jrieken
Copy link
Member

jrieken commented Jan 16, 2017

we are now on TypeScript 2.1.5

@jrieken jrieken closed this as completed Jan 16, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 29, 2019
CGNonofr pushed a commit to CodinGame/monaco-editor that referenced this issue Nov 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants