Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added overload signature.
When the result argument is TaskResult.Succeeded so the message can be optional
  • Loading branch information
ivanduplenskikh authored Jul 6, 2023
1 parent ab676de commit ff62c9b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions node/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export const setErrStream = im._setErrStream;
* from agent version 2.142.0 or higher (otherwise will no-op).
* @returns void
*/
export function setResult(result: TaskResult.Succeeded, message?: string, done?: boolean): void;
export function setResult(result: Exclude<TaskResult, 'Succeeded'>, message: string, done?: boolean): void;
export function setResult(result: TaskResult, message: string, done?: boolean): void {
debug('task result: ' + TaskResult[result]);

Expand Down

0 comments on commit ff62c9b

Please sign in to comment.