mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-26 12:10:44 +08:00
added definitions for bufferstream
This commit is contained in:
1 parent
6745ac3279
commit
3c1c84fb4c
2 files changed
+133
No files matched your search
@@ -0,0 +1,14 @@
|
||||
/// <reference path="bufferstream.d.ts" />
|
||||
|
||||
import BufferStream = require('bufferstream')
|
||||
|
||||
var stream = new BufferStream({encoding:'utf8', size:'flexible'});
|
||||
stream.enable();
|
||||
stream.disable();
|
||||
stream.split('//', ':');
|
||||
stream.on('split', (chunk: any, token: any) => {
|
||||
console.log("got '%s' by '%s'", chunk.toString(), token.toString())
|
||||
});
|
||||
stream.write("buffer:stream//23");
|
||||
console.log(stream.toString());
|
||||
|
||||
Reference in new issue
Block a user