mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-05-29 15:44:31 +00:00
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.