EUCKRDecoder.d.ts 680 B

12345678910111213141516171819202122
  1. import { Stream } from "../../common";
  2. /**
  3. * @constructor
  4. * @implements {Decoder}
  5. * @param {{fatal: boolean}} options
  6. */
  7. export declare class EUCKRDecoder {
  8. readonly fatal: boolean;
  9. euckr_lead: number;
  10. constructor(options: {
  11. fatal: boolean;
  12. });
  13. /**
  14. * @param {Stream} stream The stream of bytes being decoded.
  15. * @param {number} bite The next byte read from the stream.
  16. * @return {?(number|!Array.<number>)} The next code point(s)
  17. * decoded, or null if not enough data exists in the input
  18. * stream to decode a complete code point.
  19. */
  20. handler(stream: Stream, bite: number): (number | Array<number>) | null;
  21. }