Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct encoding types #362

Merged
merged 1 commit into from
Oct 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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