Import APIs from the package root:
Your project needs DOM library types. If your TypeScript environment does not define Web Serial, add compatible declarations separately. Outside the browser, install @v5x/node for a Web Serial compatible transport to pass to V5SerialDevice.
The package is transport-oriented and does not render a device chooser or application UI.
Install the serial library - v5x