Skip to content
New issue

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

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

Already on GitHub? # to your account

'ptyProcess.on' is deprecated #552

Closed
Seanmclem opened this issue Aug 8, 2022 · 2 comments
Closed

'ptyProcess.on' is deprecated #552

Seanmclem opened this issue Aug 8, 2022 · 2 comments
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@Seanmclem
Copy link
Contributor

Environment details

  • OS: Mac
  • OS version: Latest
  • node-pty version: 0.10.1

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
Copy link
Contributor Author

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 Tyriar added the bug Issue identified by VS Code Team member as probable bug label Aug 8, 2022
@Tyriar
Copy link
Member

Tyriar commented Aug 8, 2022

Yes, the readme is out of date atm 👍

Seanmclem added a commit to Seanmclem/node-pty that referenced this issue Aug 8, 2022
See my idea here microsoft#552

Seems like the deprecated syntax needs updated from `ptyProcess.on('data', function (data) {` -> to -> `ptyProcess.onData((data: any) => {`
@Tyriar Tyriar added this to the 1.0.0 milestone Aug 8, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants