Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeScript: Signature for '???' is duplicated

  1. Create a WinJS windows 8 application
  2. Add the windows 8 phonegap javascript library to the project
  3. Add the d.ts phonegap typescript definition library from https://github.com/borisyankov/DefinitelyTyped
  4. Add a script.ts file to the project
  5. type the following

Code:

///<reference path="phonegap.d.ts" />

var x = 1;

Now if you "compile" the script.ts file in VS I get the following error

C:/Program Files (x86)/Microsoft SDKs/TypeScript/lib.d.ts(4551,4): 
Signature for 'clearWatch' is duplicated

In my VS 2012 I also have the following extension installed (which may be related to the issue but not sure)

  • TypeScript
  • Web Essentials
like image 634
Jason Jarrett Avatar asked Nov 21 '25 19:11

Jason Jarrett


1 Answers

The reason for this is both lib.d.ts and phonegap.d.ts has a method called clearWatch in the Geolocation interface.

I suggest you to comment out this method from phonegap.d.ts

like image 95
Rajeesh Avatar answered Nov 23 '25 08:11

Rajeesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!