From 50a5683e41d4e7b8ce415fdc28d868ce78db53c6 Mon Sep 17 00:00:00 2001 From: Seanmclem <6831540+Seanmclem@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:45:52 -0400 Subject: [PATCH] update README with new onData pattern See my idea here https://github.com/microsoft/node-pty/issues/552 Seems like the deprecated syntax needs updated from `ptyProcess.on('data', function (data) {` -> to -> `ptyProcess.onData((data: any) => {` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21a6969f2..6f609261f 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ var ptyProcess = pty.spawn(shell, [], { env: process.env }); -ptyProcess.on('data', function(data) { +ptyProcess.onData((data) => { process.stdout.write(data); });