Typescript Error compiling last jquery declaration file: jquery.d.ts (164.59): Expected '{'

I have included jquery.d.ts using "tsd". But when trying to compile it:

tsc typings/jquery/jquery.d.ts

I got the following error:

typings/jquery/jquery.d.ts (164,59): Expected '{'

jquery.d.ts Line: 164

interface JQueryXHR extends XMLHttpRequest, JQueryPromise<any> {

Installed Versions:

Typescript: 0.9.5
NPM: 1.3.4
NODE: 0.10.25

I realized that if you change the line to the following:

interface JQueryXHR extends XMLHttpRequest, JQueryPromise {

this error will no longer be selected on this line, but the next one. Therefore, it seems to me that the compiler does not support any definitions like:

SomeType<T>

Am I using the wrong typescript version? I used npm to install this and it seems the newest.

I'm new to typescript - so will someone tell me?

Problem detected: an old version of tsc was registered in the system path. I added the correct path to the tsc binary, and everything works fine.

+3
1

, generics (SomeType<T>) 1.0.

6 Generics , TypeScript 1.0. - [MS], 25 2013 . ()

, , , 0.9.5. , .

Windows:

  • C:\Program Files (x86)\Microsoft SDKs\TypeScript\
  • , .
  • ...\0.9\tsc.exe.
  • , %PATH%:
    • echo %PATH%
    • "typescript", , .

Linux- , "Program Files".;)

0

All Articles