mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
Merge pull request #31007 from Xapphire13/patch-1
fix [SerialPort]: Change `data` -> `delimiter` in ready-parser options
This commit is contained in:
Vendored
+1
-1
@@ -103,7 +103,7 @@ declare namespace SerialPort {
|
||||
constructor(options: {delimiter: string | Buffer | number[], encoding?: 'ascii'|'utf8'|'utf16le'|'ucs2'|'base64'|'binary'|'hex'});
|
||||
}
|
||||
class Ready extends Stream.Transform {
|
||||
constructor(options: {data: string | Buffer | number[]});
|
||||
constructor(options: {delimiter: string | Buffer | number[]});
|
||||
}
|
||||
class Regex extends Stream.Transform {
|
||||
constructor(options: {regex: RegExp});
|
||||
|
||||
@@ -107,7 +107,7 @@ function test_parsers() {
|
||||
const CCTalkParser = new SerialPort.parsers.CCTalk();
|
||||
const DelimiterParser = new SerialPort.parsers.Delimiter({ delimiter: Buffer.from('EOL') });
|
||||
const ReadlineParser = new SerialPort.parsers.Readline({ delimiter: '\r\n' });
|
||||
const ReadyParser = new SerialPort.parsers.Ready({ data: 'READY' });
|
||||
const ReadyParser = new SerialPort.parsers.Ready({ delimiter: 'READY' });
|
||||
const RegexParser = new SerialPort.parsers.Regex({regex: /.*/});
|
||||
|
||||
port.pipe(ByteLengthParser);
|
||||
|
||||
Reference in New Issue
Block a user