Skip to content

Commit

Permalink
Clean up IStreamHandlerDelegate API
Browse files Browse the repository at this point in the history
  • Loading branch information
hershal committed Jun 30, 2017
1 parent 1d1b3de commit 7fef6fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export interface IStreamDelegate {


export interface IStreamHandlerDelegate extends IStreamDelegate {
stdinStreamSerializeCharacter(): string;
/* Defines the chunk creation trigger. */
streamChunkTrigger(): string;
}


Expand Down
2 changes: 1 addition & 1 deletion src/StreamHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class StandardInputStreamHandler {
private debug = Debug('InputParserReadFilesOptionalStandardInput');

public once(stream: any): Promise<string[]> {
const chunkString = this.delegate.stdinStreamSerializeCharacter();
const chunkString = this.delegate.streamChunkTrigger();
const serializer = new StreamSerializer(chunkString);

return new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion test/StreamHandlerSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class BasicStreamHandlerDelegate implements IStreamHandlerDelegate {
}

/* Delegate methods */
public stdinStreamSerializeCharacter(): string {
public streamChunkTrigger(): string {
return this.streamSerializationString;
}

Expand Down

0 comments on commit 7fef6fa

Please sign in to comment.