Add generic type

This commit is contained in:
Jerry Kurian 2019-09-09 15:15:40 -04:00
parent eed36a4fe9
commit d33d8dcad3
2 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,7 @@ function _accumulator<T>(
const buffer: T[] = [];
return new Transform({
...options,
transform(data: any, encoding, callback) {
transform(data: T, encoding, callback) {
try {
accumulateBy(data, buffer, this);
callback();

View File

@ -118,6 +118,7 @@ class Demux extends Writable {
}
return this;
}
public once(event: string, cb: any) {
switch (eventsTarget[event]) {
case EventSubscription.Self: