Commit Graph
47 Commits
Author SHA1 Message Date
Derek Cicerone d2b389f7df Fix type of ElementFinder's IThenable interface
There are 2 edits here:
1. Remove unnecessarily overridden methods in ElementFinder (they are defined in IThenable).
2. Change the parameterized type in IThenable to 'any' to account for things like ElementFinder.evaluate() which may return primitive values.
2014-12-23 14:59:10 -05:00
Derek Cicerone c22650edab Fix types for promises in selenium-webdriver
The webdriver promises were recently made generic (that whole commit is actually pretty impressive!) but I think the definitions for the then methods are slightly incorrect. Looking at the original jsdoc (which I assume was imported from the original closure annotations) some edits appear to be necessary:
1. The return type of the success callback should match the returned promise's generic type.
2. The success callback can return a promise that will automatically be unwrapped.

I also made some other housekeeping edits:
* removed @param type information and @template since TypeScript puts type annotations directly in the code
* my editor removes trailing whitespace and adds a newline at the EOF

Once TypeScript 1.4 is out, these definitions can likely be simplified by using union types.
2014-12-20 13:07:29 -05:00
Derek Cicerone b94154fb08 Update jquery.simulate-tests.ts 2014-01-28 17:22:29 -05:00
Derek Cicerone 72e8f83731 Create jquery.simulate-tests.ts 2014-01-28 15:55:25 -05:00
Derek Cicerone 1343b32aa9 Create jquery.simulate.d.ts
I choose to go with a more relaxed definition (versus specifying the exact options allowed for each event type) because it would have required duplicating event definitions from lib.d.ts (the properties of the events in lib.d.ts are all mandatory whereas they would be optional in this usage).
2014-01-28 15:53:12 -05:00
Derek Cicerone c88f710983 Update messenger.d.ts
* adding documentation and missing stuff
2014-01-27 21:40:20 -05:00
Derek Cicerone 2d4c46b54b Create messenger-tests.ts
* this close to the surface area that we use - i don't feel comfortable adding more info without having actual usage
2014-01-27 21:39:29 -05:00
Derek Cicerone b7e1c8b53e Create jquery.color-tests.ts 2014-01-27 14:16:46 -05:00
Derek Cicerone def4da160b Update jquery.color.d.ts 2014-01-27 14:16:20 -05:00
Derek Cicerone 9f9c809102 Additional types for slick.headerbutton.d.ts 2014-01-27 13:03:20 -05:00
Derek Cicerone ada58339f4 Update slick.headerbuttons.d.ts 2014-01-25 15:11:53 -05:00
Derek Cicerone 6731dd1aec Create jquery.color.d.ts 2014-01-23 19:07:01 -05:00
Derek Cicerone f9df66c80d Create slick.headerbuttons.d.ts
Headerbuttons is a SlickGrid plugin so I put it in the slickgrid directory:
https://github.com/mleibman/SlickGrid/blob/master/plugins/slick.headerbuttons.js?source=cc
2014-01-23 19:03:53 -05:00
Derek Cicerone 6aa70b2cc5 Add missing error-handling methods
* also added the inspect method (https://github.com/cujojs/when/blob/master/docs/api.md#inspect)
2014-01-23 15:13:41 -05:00
Derek Cicerone 45aa490963 Create messenger.d.ts 2014-01-23 15:02:32 -05:00
Derek Cicerone 42f347283f Leaflet: fix default icon constructor
This fix allows this code (which worked in an earlier version):

var icon = new L.Icon.Default();
2014-01-23 14:44:50 -05:00
Derek Cicerone 422822586b Fix noImplicitAny 2013-11-28 13:19:53 -05:00
Derek Cicerone 473659fb66 More implicit anys 2013-11-27 17:12:00 -05:00
Derek Cicerone 3b64c0a072 Fix getItemById()
It was missing a necessary parameter.
2013-10-28 17:02:58 -04:00
Derek Cicerone 1e83c5da21 Fix future bug in slickgrid.d.ts
Really subtle bug: the function should be using the class generic parameter - not a new one just for the method.
2013-10-25 17:39:28 -04:00
Derek Cicerone fe4b190435 Fix future bug in require.d.ts
Callbacks need to use 'Function' if the arguments to it aren't known ahead of time - see discussion here: https://typescript.codeplex.com/discussions/462819
2013-10-24 19:10:25 -04:00
Derek Cicerone bacdd2e984 Fix future bugs in backbone.d.ts
Callbacks need to use Function if the arguments to it aren't known ahead of time - see discussion here: https://typescript.codeplex.com/discussions/462819
2013-10-24 14:40:40 -04:00
Derek Cicerone b03290184e Fix the typing of L.Icon.Default
This wasn't quite right and the 'develop' branch of the TypeScript compiler no longer accepted the hacky typing.  This should be the correct typing according to information from the TS team here:
https://typescript.codeplex.com/workitem/132
2013-10-13 15:11:26 -04:00
Derek Cicerone cdbcec0205 Fix optional argument in slickgrid.d.ts
From looking at the code, this argument appears to be optional.  Also, we are omitting it in our code and it works.
2013-10-11 21:46:59 -04:00
Derek Cicerone 65000321ad Fix future bugs in slickgrid.d.ts
The 'develop' version of the TypeScript compiler is pickier about generics being fully specified.  I believe these are the proper missing types.
2013-10-11 21:02:37 -04:00
Derek Cicerone 690b190b09 Fix future bugs in moment.d.ts
The 'develop' version of the TypeScript compiler requires all generics to be fully specified.  I believe these arrays should all be numbers: http://momentjs.com/docs/#/parsing/array/
2013-10-11 20:49:44 -04:00
Derek Cicerone 5b00360b17 Fix future bugs in leaflet.d.ts
The 'develop' TypeScript compiler is pickier about generics being fully specified.  In this case, 3 arrays could be more specific about the type of elements.
2013-10-11 20:40:00 -04:00
Derek Cicerone d3124df1d4 Fix jquery.d.ts break with TypeScript 'develop' branch
The beta compiler is smarter about detecting inconsistencies:
jquery.d.ts(192,11): error TS2189: Interface 'JQueryEventObject' cannot simultaneously extend types 'BaseJQueryEventObject' and 'JQueryInputEventObject':
Types of property 'metaKey' of types 'BaseJQueryEventObject' and 'JQueryInputEventObject' are not identical.

Documentation seems to indicate 'boolean' is correct: http://api.jquery.com/event.metaKey/
2013-10-11 20:23:28 -04:00
Derek Cicerone 7405a33a7c Fixes for underscore.d.ts
* the type of elements in the array returned by pluck have no correlation to the type of elements in the source array - they actually relate to the values of the provided property name
* bind wasn't working for a function typed as "Function".  In our use case, we call _.throttle() then use the result in _.bind().
* the hash function passed into memoize may take multiple arguments
2013-10-10 19:31:06 -04:00
Derek Cicerone 4f3546a1e5 Fix noImplicitAny in handlebars.d.ts
* diff from the previous change is on line 20 - "options" needed to be optional
2013-10-03 12:11:32 -04:00
Derek Cicerone 4b087f54e5 Fix noImplicitAny in zeroclipboard.d.ts
* checked all of these against the source code, they should all be correct (no assumptions about return types this time :)
2013-10-02 22:02:30 -04:00
Derek Cicerone 2f6ef85160 Add missing r, g, b for RGBColor and empty() for Selection 2013-10-01 15:00:04 -04:00
Derek Cicerone 19c3427645 Fix noImplicitAny errors in chai-assert.d.ts
* assuming void for all return types
2013-09-28 17:34:48 -04:00
Derek Cicerone aee4382e39 Create cometd.d.ts 2013-09-28 01:30:36 -04:00
Derek Cicerone 8183240157 Create when.d.ts 2013-09-27 14:09:10 -04:00
Derek Cicerone bc63597ea3 Fix breaks identified by TypeScript 0.9.1.1 2013-08-25 11:13:54 +02:00
Derek Cicerone e4cfb3a842 Fix breaks identified by TypeScript 0.9.1.1 2013-08-21 17:08:45 -04:00
Derek Cicerone 1629acedfa Fix more bool usage picked up by the 0.9.1 beta 2013-07-28 20:40:15 -07:00
Derek Cicerone 210b10c347 Replace bool with boolean (for TypeScript 0.9.0+) 2013-07-02 19:43:47 -04:00
Derek Cicerone 221f0bcfb0 Replace bool with boolean (for TypeScript 0.9.0+) 2013-07-02 16:11:22 -04:00
Derek Cicerone 24ca683da9 Replace bool with boolean (for TypeScript 0.9.0+) 2013-07-02 14:57:23 -04:00
Derek Cicerone 555d0f5c5f Replace bool with boolean (for TypeScript 0.9.0+) 2013-07-01 19:10:05 -04:00
Derek Cicerone f42029618d Replace bool with boolean (for TypeScript 0.9.0+)
Looks like my editor removed trailing whitespace and possibly also normalized some line endings as well.
2013-07-01 18:00:11 -04:00
Derek Cicerone 9941765485 Replace bool with boolean (for TypeScript 0.9.0+) 2013-07-01 17:38:49 -04:00
Derek Cicerone 054918bf52 Update version number to 2.0.0
The isSame, isBefore, isAfter functions all appear to be new in 2.0.0.
2013-06-30 21:37:24 -04:00
Derek Cicerone 9f6176c717 Replace bool with boolean (for TypeScript 0.9.0+) 2013-06-29 17:32:44 -04:00
Derek Cicerone cb2af0bfae Replace bool with boolean (for TypeScript 0.9.0+) 2013-06-29 17:29:14 -04:00