toip.tools

function · Node only

listSerialPorts

Serial ports, with a hint at the board family from the USB vendor id (never the firmware).

@toip-tools/mesh-transport/nodeView source
TypeScriptImport
import { listSerialPorts } from "@toip-tools/mesh-transport/node";

Declaration

TypeScriptSignature
listSerialPorts(list?: () => Promise<{
    path: string;
    vendorId?: string;
    productId?: string;
}[]>): Promise<{
    path: string;
    vendorId?: string | undefined;
    productId?: string | undefined;
    hint?: string | undefined;
}[]>;

Parameters

listoptional
() => Promise<{ path: string; vendorId?: string; productId?: string; }[]>

Default: () => SerialPort.list()

Returns

Promise<{ path: string; vendorId?: string | undefined; productId?: string | undefined; hint?: string | undefined; }[]>