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

Allow selection of multiple ports #104

Open
crowlKats opened this issue Nov 10, 2020 · 3 comments
Open

Allow selection of multiple ports #104

crowlKats opened this issue Nov 10, 2020 · 3 comments

Comments

@crowlKats
Copy link

crowlKats commented Nov 10, 2020

Should the first SerialPort be returned if multiple are found that match options.filter (or no filter passed)?

@reillyeon
Copy link
Collaborator

The requestPort() method shows the user a list of devices that match options.filter and it is only the one selected by the user that is returned. It is possible that an options.multiple flag could be added to indicate that the user is allowed to select multiple devices.

@crowlKats
Copy link
Author

so requestPort should rather return a Promise<sequence<SerialPort>> instead of a Promise<SerialPort>?

@reillyeon
Copy link
Collaborator

If I added the ability to allow multiple ports to be selected I would probably change the return type only when that flag was passed. Always returning a sequence makes it harder for developers in the common case.

@reillyeon reillyeon changed the title what should happen when getting a port for requestPort gives multiple results? Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants