line.d.mts 617 B

1234567891011121314151617
  1. export type Bytes = string | ArrayBuffer | Uint8Array | null | undefined;
  2. /**
  3. * A re-implementation of httpx's `LineDecoder` in Python that handles incrementally
  4. * reading lines from text.
  5. *
  6. * https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258
  7. */
  8. export declare class LineDecoder {
  9. #private;
  10. static NEWLINE_CHARS: Set<string>;
  11. static NEWLINE_REGEXP: RegExp;
  12. constructor();
  13. decode(chunk: Bytes): string[];
  14. flush(): string[];
  15. }
  16. export declare function findDoubleNewlineIndex(buffer: Uint8Array): number;
  17. //# sourceMappingURL=line.d.mts.map