XUserDefinedDecoder.d.ts 670 B

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