import { Transform } from "stream";
export class TestStream extends Transform {
constructor(options) {
super(options);
}
write(data: any, enc: string, cb: Function) {
return super.write(data, enc, cb);
}
}
I'm getting following error on the above code.
Class 'TestStream' incorrectly extends base class 'Transform'. Types of property 'write' are incompatible. Type '(data: any, enc: string, cb: Function) => boolean' is not assignable to type '{ (chunk: any, cb?: Function): boolean; (chunk: any, encoding?: string, cb?: Function): boolean; }'.