Files
DefinitelyTyped/selenium-webdriver
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
..