@serialport/bindings-interface
Advanced tools
Comparing version 1.0.0 to 1.1.0
/// <reference types="node" /> | ||
export declare interface BindingInterface<Port extends BindingPortInterface = BindingPortInterface, Open extends OpenOptions = OpenOptions> { | ||
export declare interface BindingInterface<T extends BindingPortInterface = BindingPortInterface, R extends OpenOptions = OpenOptions, P extends PortInfo = PortInfo> { | ||
/** | ||
Retrieves a list of available serial ports with metadata. The `path` must be guaranteed, and all other fields should be undefined if unavailable. The `path` is either the path or an identifier (eg `COM1`) used to open the serialport. | ||
*/ | ||
list(): Promise<PortInfo[]>; | ||
list(): Promise<P[]>; | ||
/** | ||
* Opens a connection to the serial port referenced by the path. | ||
*/ | ||
open(options: Open): Promise<Port>; | ||
open(options: R): Promise<T>; | ||
} | ||
@@ -105,2 +105,4 @@ | ||
export declare type OpenOptionsFromBinding<Binding> = Binding extends BindingInterface<any, infer T> ? T : never; | ||
/** | ||
@@ -121,2 +123,6 @@ Serial port info with metadata. Only the `path` is guaranteed. If unavailable the other fields will be undefined. The `path` is either the path or an identifier (eg `COM1`) used to open the SerialPort. | ||
export declare type PortInfoFromBinding<Binding> = Binding extends BindingInterface<any, any, infer T> ? T : never; | ||
export declare type PortInterfaceFromBinding<Binding> = Binding extends BindingInterface<infer T> ? T : never; | ||
export declare interface PortStatus { | ||
@@ -123,0 +129,0 @@ cts: boolean; |
{ | ||
"name": "@serialport/bindings-interface", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "SerialPort Bindings Typescript Types", | ||
@@ -34,14 +34,14 @@ "types": "dist/index.d.ts", | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.19.4", | ||
"@types/node": "^17.0.8", | ||
"@typescript-eslint/eslint-plugin": "^4.33.0", | ||
"@typescript-eslint/parser": "^4.33.0", | ||
"esbuild": "^0.14.11", | ||
"esbuild-register": "^3.3.1", | ||
"eslint": "^7.32.0", | ||
"rollup": "^2.62.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"semantic-release": "^18.0.1", | ||
"typescript": "^4.5.4" | ||
"@microsoft/api-extractor": "7.19.4", | ||
"@types/node": "17.0.8", | ||
"@typescript-eslint/eslint-plugin": "4.33.0", | ||
"@typescript-eslint/parser": "4.33.0", | ||
"esbuild": "0.14.14", | ||
"esbuild-register": "3.3.2", | ||
"eslint": "7.32.0", | ||
"rollup": "2.66.1", | ||
"rollup-plugin-node-resolve": "5.2.0", | ||
"semantic-release": "18.0.1", | ||
"typescript": "4.5.5" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9789
7
133