Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
669 views
in Technique[技术] by (71.8m points)

visual studio 2013 - Successful build with many errors in typescript typing files

I have a problem with Visual Studio 2013 generating too many errors when building a web application with typescript definition files. For example consider the following scenario:

  1. Start a new Empty Web Application
  2. Right click on project and select Manage Nuget Packages
  3. Add jquery and jquery typings (the typings I downloaded are a couple of days old)
  4. Build the project
  5. Project builds successfully with more than 100 errors (errors, not warnings), all in jquery.d.ts, like the following:
    • ',' expected.
    • '=' expected.
    • Identifier expected.

I get similar results when I do the same with angularjs instead of jquery.

Any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The most likely reason for this is that you are using an older version of TypeScript than the definition author.

The language is moving swiftly and some of the features in version 1.4 are particularly useful in definition files, so it is likely that you will need to upgrade to 1.4 so that your machine can understand these new features.

Download version 1.4 here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...