Commit ad32f7cb authored by Zejun Lin's avatar Zejun Lin Committed by QuanluZhang
Browse files

remove Buffer warning (#100)

parent cdee9c36
...@@ -40,7 +40,7 @@ class BufferSerialEmitter { ...@@ -40,7 +40,7 @@ class BufferSerialEmitter {
private writable: Writable; private writable: Writable;
constructor(writable: Writable) { constructor(writable: Writable) {
this.buffer = new Buffer(0); this.buffer = Buffer.alloc(0);
this.emitting = false; this.emitting = false;
this.writable = writable; this.writable = writable;
} }
...@@ -61,7 +61,7 @@ class BufferSerialEmitter { ...@@ -61,7 +61,7 @@ class BufferSerialEmitter {
this.emit(); this.emit();
} }
}); });
this.buffer = new Buffer(0); this.buffer = Buffer.alloc(0);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment