@types/node-expat
TypeScript icon, indicating that this package has built-in type declarations

2.3.5 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/node-expat

Weekly Downloads

4,762

Version

2.3.5

License

MIT

Unpacked Size

4.57 kB

Total Files

5

Last publish

Collaborators

  • types