Installation
npm install --save @types/node-expat
Summary
This package contains type definitions for node-expat (https://github.com/astro/node-expat).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-expat.
index.d.ts
/// <reference types="node" />
import { Stream } from "stream";
export class Parser extends Stream {
constructor(encoding?: string);
// encoding: string;
// Stream API
writable: boolean;
readable: boolean;
_getNewParser(): Parser;
// emit(): Function;
parse(buf: Buffer | string, isFinal?: boolean): boolean;
setEncoding(encoding: BufferEncoding): void;
setUnknownEncoding(map: number[], convert?: string): void;
getError(): string;
stop(): void;
pause(): void;
resume(): void;
destroy(): any;
destroySoon(): void;
write(data: Buffer | string): boolean;
end(cb?: () => void): any;
end(chunk: any, cb?: () => void): any;
end(chunk: any, encoding: BufferEncoding, cb?: () => void): any;
reset(): void;
getCurrentLineNumber(): number;
getCurrentColumnNumber(): number;
getCurrentByteIndex(): number;
}
export function createParser(cb?: (...args: any[]) => void): Parser;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/node
Credits
These definitions were written by winston01.