Skip to content

Conversation

pawelkleczek
Copy link

Also in this PR:

  1. Dependency update
  2. Change tslint to eslint as it seems to work better now
  3. Add nvmrc file to 'kind of' lock the node version and sugest using one

@pawelkleczek
Copy link
Author

@scopsy will you be able to take a look?

* @param { Promise } promise
* @param { Object= } errorExt - Additional Information you can pass to the err object
* @return { Promise }
* Resolves a promise to an array containting error (or undefined if promise succeeds),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Resolves a promise to an array containting error (or undefined if promise succeeds),
* Resolves a promise to an array containing error (or undefined if promise succeeds),

Comment on lines +167 to +182
export function toAll<T1, T2, T3, U = Error>(
values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>],
errorExt?: object
): Promise<[U | null, [T1, T2, T3] | undefined]>;

/**
* Uses Promise.all to resolve with an array containting error (or undefined if all of the promises succeed),
* and an array of results (or null if any of the promises fail)
* @param values An array of Promises.
* @param errorExt Additional Information you can pass to the err object
* @returns A new Promise.
*/
export function toAll<T1, T2, U = Error>(
values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>],
errorExt?: object
): Promise<[U | null, [T1, T2] | undefined]>;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there is a better way to represent this in TS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants