WritableStream.d.ts 602 B

1234567891011121314151617
  1. /// <reference types="node" />
  2. import { Parser, Handler, ParserOptions } from "./Parser";
  3. import { Writable } from "stream";
  4. import { StringDecoder } from "string_decoder";
  5. /**
  6. * WritableStream makes the `Parser` interface available as a NodeJS stream.
  7. *
  8. * @see Parser
  9. */
  10. export declare class WritableStream extends Writable {
  11. _parser: Parser;
  12. _decoder: StringDecoder;
  13. constructor(cbs: Partial<Handler>, options?: ParserOptions);
  14. _write(chunk: string | Buffer, encoding: string, cb: () => void): void;
  15. _final(cb: () => void): void;
  16. }
  17. //# sourceMappingURL=WritableStream.d.ts.map