JSPM

@types/node-expat

2.3.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3331
  • Score
    100M100P100Q128753F
  • License MIT

TypeScript definitions for node-expat

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/node-expat) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    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.