Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] JSDT meeting agenda 20151103


I have noticed the freeze as well but it is not due to typescript compiler
but more of an issue on how it is used with eclipse.

Yes I agree with you. tern.java support async completion for instance to avoid freez Eclipse when ternjs takes time.

The attractive points on typescript compiler was it actually provides
a bunch of services for IDEs that could allow us to replace the
corresponding outdated JSDT ones. Also the number of type definition
libraries is very extensive for typescript.

For your information, ternjs provides a (basic) tools to tranform typescript definition to tern definition. See https://github.com/ternjs/tern/blob/master/bin/from_ts
The https://github.com/cloud9ide/tern_from_ts project host several generated tern JSON Type Definition generated from TypeScript definition.

tern.java could provide an action to generate JSON Type Definition (by calling from_ts) from TypeScript definition.


Anyhow, this was a quick experimentation on my part and I am not convinced
it is the way forward


To be honnest with you, I don't understand what you mean with "Can be used
as an alternate to tern.js". TypeScript needs to declare variable with type
(ex: var p: Person) although _javascript_ needs not that and ternjs is able
to guess the type.
Agreed. typescript compiler does not seem to provide inference in this case. It relies on
modules and module definitions.

Yes that it is. 


In my side, I have started to study how we could support
Angular2 which is based on TypeScript
https://github.com/angelozerr/angularjs-eclipse/issues/164 and I have
several ideas to support TypeScript with tern.java:

* TypeScript  provides a tsserver which uses TypeScript Language Service.
It works with "readline" and not with "http" (tern.java works only with
"http").
What is the advantage of http over readLine?

My first idea is to use TypeScript Language Service inside
tern.java by customizing JSON request/response of tsserver to adapt it for
ternjs. See project https://github.com/angelozerr/tern-tsserver What is the
benefit with existing Eclipse TypeScript plugins: the async completion of
tern.java
https://github.com/angelozerr/tern.java/wiki/New-and-Noteworthy-0.9.0#async-tern-completion
which avoid freezing Eclipse.

* my second idea (my prefered idea, but which is hard) is to implement an
acorn plugin for TypeScript like https://github.com/RReverser/acorn-jsx
have done for JSX. I have started at
https://github.com/angelozerr/tern-typescript/blob/master/acorn-ts.js .
Today I can support declaration type like (var a: Person). The benefit with
that is that we will able to use tern plugins features to customize
completion for Angular2.

This is probably the case that I would like JSDT to support better. I
hope we can replace the JSDT parser with a pluggable one like acorn. I
know that there is an interest to extend JSDT to things like QML as well so
a pluggable parser will help.

Thanks for you rfeedback, So I will try to continue tern-typescript with acorn-ts (extension of acorn to support TypeScript). 

Another advantage of this approach will be the AST can be shared among tools avoiding
extra parsing. ESTree seems to be the de-factor standard for _javascript_ AST, it would
be grand if we can support ESTree natively on JSDT so that it is shared among libraries/tools and
avoiding repeated parsing.

Yes Acorn and espree follows this specification. I think TypeScript should does that too.

>  ESTree natively on JSDT  

You mean developping a _javascript_ Parser which supports ESTree?


Regard's Angelo

2015-11-03 21:19 GMT+01:00 Gorkem Ercan <gorkem.ercan@xxxxxxxxx>:


Updated the agenda with minutes.


On 3 Nov 2015, at 10:30, Gorkem Ercan wrote:

Meeting agenda for today's JSDT call is up. As usual, please feel free to
add items.

https://wiki.eclipse.org/JSDT/Confcalls/Minutes_20151103#Meeting_Agenda

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/wtp-dev

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/wtp-dev
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top