@serialpilot/bindings-interface
v1.0.1
Published
SerialPilot Bindings TypeScript Types
Downloads
14,172
Maintainers
Readme
TypeScript interface every SerialPilot binding implements. Import this if you're authoring a custom binding (a virtual port, a TCP-bridged port, an alternative native backend) — or just for the shared error classes.
Install
npm install @serialpilot/bindings-interfaceUsage
import type { BindingInterface } from '@serialpilot/bindings-interface'
import { CancelledError, PortNotFoundError } from '@serialpilot/bindings-interface'
const MyBinding: BindingInterface = {
async list() { /* … */ },
async open(options) { /* … */ },
}The error classes (PortNotFoundError, PermissionDeniedError, DisconnectedError, CancelledError, TimeoutError, …) are also re-exported from the meta serialpilot package.
See the SerialPilot package matrix for how the layers fit together.
