esp-web-tools
Version:
Web tools for ESP devices
10 lines (9 loc) • 444 B
TypeScript
export declare const isSerialSupported: () => boolean;
/**
* Fetch the WebUSB registry chunk ahead of time. requestDevice needs
* transient user activation (about 5 seconds in Chrome), so the chunk is
* fetched when the button renders, not after the click. A failed preload is
* forgotten so the click retries it.
*/
export declare const preloadSerialSupport: () => void;
export declare const requestSerialPort: () => Promise<SerialPort>;