gazeplotter
Version:
Gazeplotter is a Svelte application for visualizing eye-tracking data.
19 lines (18 loc) • 655 B
TypeScript
/**
* Responsible for parsing the stream of const from the eye tracking file to chunks of text.
*
* The stream is decoded using a TextDecoderStream.
* File is assumed to be always complete, there is no need to check for end of file.
*/
export declare class EyeParser {
readonly rs: ReadableStream;
readonly reader: ReadableStreamDefaultReader<string>;
isDone: boolean;
constructor(rs: ReadableStream, decoder?: TextDecoderStream);
/**
* Parses one chunk of text from the stream.
* @returns {Promise<string>} The chunk of text.
* @throws {Error} If the parser is done.
*/
getTextChunk(): Promise<string>;
}