I had read \"whole internet\", but can\'t find any examples about getting syntax tree (just like in Esprima) from TypeScrypt source. I mean how can i get object like this (E
This question came up before back in September.
There isn't currently something that will do this for you - there is no magic getSyntaxTree method to call that will do this.
The TypeScript compiler is open-source, though - and written entirely in TypeScript so you can scan it to find out if there is something you can use / add a handle to.
The up-side of this is that you have a big opportunity to release your work as an open-source project as judging by the up-votes on the two questions, there is some demand for this.
Alternatively, grab the syntax tree from the compiled JavaScript (which is the code that will actually execute at runtime) using Esprima or SpiderMonkey.