microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.43k stars 232 forks source link

'ptyProcess.on' is deprecated #552

Closed Seanmclem closed 1 year ago

Seanmclem commented 1 year ago

Environment details

Issue description

When enabling typescript for my node-pty usage - I am now seeing a waring that 'ptyProcess.on' is deprecated. However, it suggests no alternative, and I see that syntax used in the README.. So is my editor wrong or are the docs outdated?

Seanmclem commented 1 year ago

Seems like the correct syntax is ptyProcess.onData((data: any) => {

rather than

ptyProcess.on('data', function (data: any) {

Still, the README would need updated, no?

Tyriar commented 1 year ago

Yes, the readme is out of date atm 👍