mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
added definitions for bufferstream
This commit is contained in:
@@ -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