borisyankov/DefinitelyTyped — pull request #1794 by derekcicerone (2014-03-07 01:11:29+00:00)
Title: Fix the return type of max() for number[]

This is an example fix for the typing of functions like max(). I only fixed max() but this impacts many many functions. This fix pattern would be quite verbose if applied to all of the affected functions.

Alternatively, callers of these APIs could directly provide the type of the result but that forces the user of the definition file to do more work.