mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-28 09:25:50 +08:00
This fixes an issue where two definitions for Promise that /should/ agree
(i.e., be assignable to one another) aren't, and instead the immensely
confusing error message:
error TS2314: Generic type 'Promise<T, R>' requires 2 type argument(s).
Even though all the present definitions are paramaterized with a single type
variable, Typescript appears to assume that the two different names are
referring to two different types and therefore you must supply both. Here I
changed it to T from R so that it matches lib.d.ts.
For reference, this error occured for me specifically when I had both
es6-promise and bluebird typings present. bluebird uses T already.