Nov 15, 2012 at 7:41 PM
Edited Nov 15, 2012 at 7:43 PM
That is very useful also for non-emacs efforts, because it pulls together most of the relevant pieces in one commandline tool (isense.ts). It is a commandline client for the language services and harness, outputting info in JSON format for editors to
Notes to typescript project:
a) the particulars of output format might differ for different consumers (ides, editors), but for documentation purposes, it would be very helpful if a commandline service client like isense.ts would be included in the main typescript repo.
b) there are some very odd things going on in typescript's standard harness.ts:
1 instead of relying on normal module system import, it tries to guess the path to typescriptServices.js and eval that source directly
2 it also tries to guess the path to lib.d.ts
Both guesses go wrong if one tries to generate an all-in-one .js somewhere outside the typescript repo. The workarounds, included in auto-complete-ts's modified harness.ts seem to be simply to comment out the eval code and to inject the lib.d.ts path
explicitly. Could these please be addressed in the original harness.ts source?
c) OptionsParser hardcodes the command name (tsc), interfering with reuse for other commandline tools.
Note for auto-complete-ts: parse should use a different pattern for result matching - at least allowing for double quotes "result" ;-)