mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-25 22:04:06 -06:00
13 lines
488 B
TypeScript
13 lines
488 B
TypeScript
import { Stream } from "./Stream";
|
|
/** @interface */
|
|
export interface Decoder {
|
|
/**
|
|
* @param {Stream} stream The stream of bytes being decoded.
|
|
* @param {number} bite The next byte read from the stream.
|
|
* @return {?(number|!Array.<number>)} The next code point(s)
|
|
* decoded, or null if not enough data exists in the input
|
|
* stream to decode a complete code point, or |finished|.
|
|
*/
|
|
handler(stream: Stream, bite: number): number | number[];
|
|
}
|