dojo / core

:rocket: Dojo 2 - language helpers and utilities.
http://dojo.io
Other
213 stars 62 forks source link

Unnecessary generic parameter for Task.race #316

Open jason0x43 opened 7 years ago

jason0x43 commented 7 years ago

Bug

Task.race takes two generic parameters, an ExtensiblePromise subclass and the type expected to be the resolution of the race call. The first parameter is unnecessary as it is never used within the Task class.

Package Version: beta1

Code

const task = Task.race<void>([ ... ]);

Expected behavior:

This should compile.

Actual behavior:

TS complains that the call signature is invalid. The following does compile:

const task = Task.race<Task<void>, void>([ ... ]);