2.3.5 • Published 6 months ago

@types/node-expat v2.3.5

Weekly downloads
911
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for node-expat 2.3
// Project: https://github.com/astro/node-expat
// Definitions by: winston01 <https://github.com/winston01>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.2

/// <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: Sat, 01 Jan 2022 14:01:38 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by winston01.

2.3.4

7 months ago

2.3.3

8 months ago

2.3.5

6 months ago

2.3.2

2 years ago

2.3.1

4 years ago

2.3.0

4 years ago