Skip to content

Instantly share code, notes, and snippets.

@bmingles
Created December 10, 2018 14:03
Show Gist options
  • Save bmingles/8db2a54a6959165efd25ef4e7006d236 to your computer and use it in GitHub Desktop.
Save bmingles/8db2a54a6959165efd25ef4e7006d236 to your computer and use it in GitHub Desktop.
declare module 'control.async' {
import Task = require('data.task');
function parallel<E1, A>(
tasks: [Task<E1, A>]
): Task<E1, [A]>;
function parallel<E1, E2, A, B>(
tasks: [Task<E1, A>, Task<E2, B>]
): Task<E1 | E2, [A, B]>;
function parallel<E1, E2, E3, A, B, C>(
tasks: [Task<E1, A>, Task<E2, B>, Task<E3, C>]
): Task<E1 | E2 | E3, [A, B, C]>;
type AsyncInstance = {
parallel: typeof parallel
};
function Async(task: typeof Task): AsyncInstance;
export = Async;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment