Add generic type
This commit is contained in:
parent
eed36a4fe9
commit
d33d8dcad3
@ -17,7 +17,7 @@ function _accumulator<T>(
|
|||||||
const buffer: T[] = [];
|
const buffer: T[] = [];
|
||||||
return new Transform({
|
return new Transform({
|
||||||
...options,
|
...options,
|
||||||
transform(data: any, encoding, callback) {
|
transform(data: T, encoding, callback) {
|
||||||
try {
|
try {
|
||||||
accumulateBy(data, buffer, this);
|
accumulateBy(data, buffer, this);
|
||||||
callback();
|
callback();
|
||||||
|
@ -118,6 +118,7 @@ class Demux extends Writable {
|
|||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public once(event: string, cb: any) {
|
public once(event: string, cb: any) {
|
||||||
switch (eventsTarget[event]) {
|
switch (eventsTarget[event]) {
|
||||||
case EventSubscription.Self:
|
case EventSubscription.Self:
|
||||||
|
Loading…
Reference in New Issue
Block a user