Skip to content

Commit

Permalink
Make CompletionListener compliant with docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavohenke committed Jan 2, 2022
1 parent 3eb9d0a commit 75d6a5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/completion-listener.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Rx from 'rxjs';
import { bufferCount, switchMap, take } from 'rxjs/operators';
import { Command } from './command';
import { CloseEvent, Command } from './command';

/**
* Defines which command(s) in a list must exit successfully (with an exit code of `0`):
Expand Down Expand Up @@ -56,7 +56,7 @@ export class CompletionListener {
*
* @returns A Promise that resolves if the success condition is met, or rejects otherwise.
*/
listen(commands: Command[]): Promise<unknown> {
listen(commands: Command[]): Promise<CloseEvent[]> {
const closeStreams = commands.map(command => command.close);
return Rx.merge(...closeStreams)
.pipe(
Expand Down

0 comments on commit 75d6a5d

Please sign in to comment.