Skip to content

Commit

Permalink
Correct encoding types
Browse files Browse the repository at this point in the history
Fixes #312
  • Loading branch information
Tyriar committed Oct 22, 2019
1 parent 74edc71 commit 9520129
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface ITerminal {
/**
* Set the pty socket encoding.
*/
setEncoding(encoding: string): void;
setEncoding(encoding: string | null): void;

/**
* Resume the pty socket.
Expand Down
2 changes: 1 addition & 1 deletion src/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export abstract class Terminal implements ITerminal {
}

/** See net.Socket.setEncoding */
public setEncoding(encoding: string): void {
public setEncoding(encoding: string | null): void {
if ((<any>this._socket)._decoder) {
delete (<any>this._socket)._decoder;
}
Expand Down
2 changes: 1 addition & 1 deletion typings/node-pty.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ declare module 'node-pty' {
* If unset, incoming data will be delivered as raw bytes (Buffer type).
* By default 'utf8' is assumed, to unset it explicitly set it to `null`.
*/
encoding?: string;
encoding?: string | null;

/**
* Whether to enable flow control handling (false by default). If enabled a message of `flowControlPause`
Expand Down

0 comments on commit 9520129

Please sign in to comment.