-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
Description
SerialPort Version
10.5.0
Node Version
v16.16.0
Electron Version
No response
Platform
Microsoft Windows NT 10.0.22621.0 x64
Architecture
No response
Hardware or chipset of serialport
No response
What steps will reproduce the bug?
I am working on a VSCode extension. The error occurs when trying to run the extension.
What happens?
I get this error:
node_modules/@serialport/stream/dist/index.d.ts:100:5 - error TS2416: Property '_write' in type 'SerialPortStream<T>' is not assignable to the same property in base type 'Duplex'.
Type '(data: Buffer, encoding: BufferEncoding | undefined, callback: (error: Error | null) => void) => void' is not assignable to type '(chunk: any, encoding: string, callback: (error?: Error | null | undefined) => void) => void'.
Types of parameters 'encoding' and 'encoding' are incompatible.
Type 'string' is not assignable to type 'BufferEncoding | undefined'.
100 _write(data: Buffer, encoding: BufferEncoding | undefined, callback: (error: Error | null) => void): void;
What should have happened?
It shouldn't have gotten this error? If I manually change the line in the file to _write(data: Buffer, encoding: BufferEncoding, callback: (error: Error | null) => void): void;, it runs fine.
Additional information
No response
Zandor300 and pierreroth64